Explicitly check for $keyValues whether they are array or not#1
Merged
mavericknsk merged 1 commit intoplesk:1.12.17-pleskfrom May 21, 2018
mlapkin:handle-key-values-explicitly
Merged
Explicitly check for $keyValues whether they are array or not#1mavericknsk merged 1 commit intoplesk:1.12.17-pleskfrom mlapkin:handle-key-values-explicitly
$keyValues whether they are array or not#1mavericknsk merged 1 commit intoplesk:1.12.17-pleskfrom
mlapkin:handle-key-values-explicitly
Conversation
xgin
reviewed
May 21, 2018
library/Zend/Db/Table/Abstract.php
Outdated
| $numberTerms = 0; | ||
| foreach ($args as $keyPosition => $keyValues) { | ||
| $keyValuesCount = count($keyValues); | ||
| $keyValuesCount = is_array($keyValues) || (interface_exists('Countable') && $keyValues instanceof Countable) |
Member
There was a problem hiding this comment.
You don't have to check interface_exists('Countable') before instanceof
sofiiakulish
pushed a commit
that referenced
this pull request
Mar 28, 2025
… ($string) of type string is deprecated; File: /opt/psa/admin/plib/vendor/plesk/zf1/library/Zend/ProgressBar/Adapter/Console.php, Line: 458
sofiiakulish
pushed a commit
that referenced
this pull request
Mar 28, 2025
… ($string) of type string is deprecated
sofiiakulish
added a commit
that referenced
this pull request
Mar 28, 2025
…ruction-substr-Passing-null-to-parameter-1-string-of-type-string-is-deprecated-PPP-67969 Fix PHP Deprecated Construction: substr(): Passing null to parameter #1 ($string) of type string is deprecated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since PHP 7.2
count()will emitE_WARNINGif its first argument isn't an array orCountable.