User tests: Successful: Unsuccessful:
PHP 7.2 disallows the use of the count()
function on non countable items (arrays or objects implementing the Countable
interface). We have places in our API where null values were being returned then pushed into a count()
call, this PR addresses three uses found on a cursory click through a CMS install using PHP 7.2.0RC5.
To verify:
Updater.php
file by way of the plugin which checks for updates and sends an email notification triggering an update check. This is caused by properties in the CollectionAdapter
class not being initialized as empty arrays and therefore when no updates are found the properties are still set as null versus being array.com_content
articles model. This is caused by a state value not setting an appropriate default if the state value is null.Apply the patch and repeat these steps.
(If you do not reinstall before item 1, you will need to clear the update check timestamps for the plg_system_updatenotification
plugin params and the Joomla! Core update site).
Data is displayed without error.
Errors as a result of trying to count a non-countable item.
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_content Libraries Modules Front End |
Labels |
Added:
?
|
I have tested this item
All three cases were showing the warning running PHP 7.2RC6. After applying the patch the warnings were gone.
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
Ready to Commit after two successful tests.
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-11-30 14:27:22 |
Closed_By | ⇒ | rdeutz | |
Labels |
Added:
?
|
I have tested this item✅ successfully on 26ee013
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/18438.