-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.4] limitstart php deprecation #45778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
[25-Jul-2025 08:59:35 UTC] PHP Deprecated: array_slice(): Passing null to parameter #2 ($offset) of type int is deprecated in D:\repos\j51\administrator\components\com_installer\src\Model\InstallerModel.php on line 129 npx cypress run --spec '.\tests\System\integration\administrator\components\com_installer\' Signed-off-by: BrianTeeman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the time for a test now, but by review it looks pretty right.
|
@brianteeman sorry... Not able to test this. |
@hans2103 Thank you for trying to run Cypress-based System Tests 🚀
@brianteeman Could you please adjust/extend the test description? |
|
No idea why you dont see the php error log entries - you should check your php logging and error reporting settings This was deprecated in php 8.1 https://www.php.net/manual/en/migration81.deprecated.php You wont see them in the Log Deprecated API log as that is for Joomla deprecations NOT php deprecations |
|
I have been testing this PR and I get four tests passed. However, there is no php error log created. I have tried with php8.3 and php8.4. I know this is something to do with my Apache/PHP installation on Mac but I do not know what. Thinking... This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45778. |
for my local installation it is: |
|
Setting RTC as we have 2 approvals by experienced maintainers, and it is a no-brainer. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/45778. |
|
Final test before merge:
|
|
Thank you @brianteeman for your contribution. Thank you @richard67, @hans2103, @ceford and @rdeutz for supporting this PR. |
Summary of Changes
$limitstart is passed as the second parameter to array_slice(). If $limitstart is null, it triggers the deprecation warning because array_slice() expects an integer for $offset.
Testing Instructions
npx cypress run --spec '.\tests\System\integration\administrator\components\com_installer\'check php error_log
Actual result BEFORE applying this Pull Request
PHP Deprecated: array_slice(): Passing null to parameter #2 ($offset) of type int is deprecated in administrator\components\com_installer\src\Model\InstallerModel.php on line 129
Expected result AFTER applying this Pull Request
this deprecated entry in the logs is resolved
note: there are other deprecation notices about tobscure see joomla-backports/json-api-php#4
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed