Skip to content

Add check for null before passing available_at field to strtotime#149

Merged
ianardee merged 2 commits into
mindee:mainfrom
psihius:patch-2
Oct 8, 2025
Merged

Add check for null before passing available_at field to strtotime#149
ianardee merged 2 commits into
mindee:mainfrom
psihius:patch-2

Conversation

@psihius

@psihius psihius commented Oct 7, 2025

Copy link
Copy Markdown
Contributor

When running in declare(strict_type=1) mode, a deprication notice is being triggered, which in our case triggers an error:

Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated

This PR adds a check for null before passing the field to strtotime.

  • Bug fix (non-breaking change which fixes an issue)

@ianardee

ianardee commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator

Thanks much for the PR, could you just inverse the order of the operators please?

@psihius

psihius commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

Thanks much for the PR, could you just inverse the order of the operators please?

As in null !== $rawResponse['available_at'] => $rawResponse['available_at'] !== null?

@psihius

psihius commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

@ianardee done

@ianardee ianardee merged commit 2f81230 into mindee:main Oct 8, 2025
22 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants