Skip to content

Fix calling json_decode with non-string input#25

Merged
HPiirainen merged 2 commits intomasterfrom
php8-deprecations
Feb 6, 2024
Merged

Fix calling json_decode with non-string input#25
HPiirainen merged 2 commits intomasterfrom
php8-deprecations

Conversation

@HPiirainen
Copy link
Copy Markdown
Contributor

PHP Deprecated:  json_decode(): Passing null to parameter #1 ($json) of type string is deprecated in wp-oopi/src/Util.php on line 25"

json_decode expects the first parameter to be a string, so let's just return false if the input is not a string.

@HPiirainen HPiirainen requested a review from Liblastic January 29, 2024 16:44
Copy link
Copy Markdown

@Liblastic Liblastic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@HPiirainen HPiirainen merged commit 454d5fe into master Feb 6, 2024
@HPiirainen HPiirainen deleted the php8-deprecations branch February 6, 2024 15:29
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