User tests: Successful: Unsuccessful:
Code Review.
At this location $pks
is an array, and you are trying to sprintf
it as if it were a string, which would raise a warning/notice (see https://3v4l.org/lnOBl)
We know its going to be an array at this point as $pks = ArrayHelper::toInteger($pks);
returns an array.
Ive chosen implode, but json_encode would have been just as good I guess. No one has ever seen this error in real life I doubt
In PHP 8 this would be a Warning
whereas before it would be a Notice
and I bet it will become a Fatal Error
in later PHP versions probably... who knows...
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
This fix is not needed on Joomla 3 as the code is different and Joomla 3 is using $pk[0]
and not the whole array of $pk
like Joomla 4 does.
The line in Joomla 3 is this:
joomla-cms/libraries/src/Table/Nested.php
Line 938 in d55ab7f
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-12-29 23:13:47 |
Closed_By | ⇒ | wilsonge | |
Labels |
Added:
?
|
Doh! I failed to read properly. Thanks!
No worries - thanks.
Obviously this is fine. But can I persuade you to redo this one targeting the 3.10 branch please. As it's going to be relevant there and it will be merged up.