User tests: Successful: Unsuccessful:
This change fixes the fatal error during an update:
Fatal error: Cannot use object of type stdClass as array in libraries/cms/component/helper.php on line 433
To test this fix is a bit cumbersome but here are the steps for reproducing the issue:
1. Setup a clean Joomla 3.3.6 installation
2. Download the Cache_Lite code from http://download.pear.php.net/package/Cache_Lite-1.7.16.tgz
3. Unpack the files from this archive
4. Copy the Cache folder to the clean Joomla 3.3.6 installation folder libraries\joomla\cache\storage\ so you get the path libraries\joomla\cache\storage\Cache within there the Lite.php file and Lite folder.
5. Go to System -> Global Configuration -> System
6. Set Cache to ON - Conservative caching
7. Set Cache Handler to Cache_Lite
8. Save the configuration
9. Download the Joomla 3.4 beta 2 full package from https://github.com/joomla/joomla-cms/releases/tag/3.4.0-beta2
10. Go to Extensions -> Extension Manager -> Upload Package File
11. Select the file you downloaded in step 11
12. Click on Upload & Install
13. Observe the fatal error
Now that we have the error we need to redo the process to test the fix. Here are the steps to test the fix:
1. Setup a clean Joomla 3.3.6 installation
2. Download the Cache_Lite code from http://download.pear.php.net/package/Cache_Lite-1.7.16.tgz
3. Unpack the files from this archive
4. Copy the Cache folder to the clean Joomla 3.3.6 installation folder libraries\joomla\cache\storage\ so you get the path libraries\joomla\cache\storage\Cache within there the Lite.php file and Lite folder.
5. Go to System -> Global Configuration -> System
6. Set Cache to ON - Conservative caching
7. Set Cache Handler to Cache_Lite
8. Save the configuration
9. Download the Joomla 3.4 beta 2 full package from https://github.com/joomla/joomla-cms/releases/tag/3.4.0-beta2
10. Unpack the package into a folder
11. Go to the file libraries/cms/component/helper.php
12. Replace line 423 which looks like
static::$components = $cache->get(array($db, 'loadObjectList'), array('option'), $option, false);
with:
$components = $cache->get(array($db, 'loadObjectList'), array('option'), $option, false);
/**
* Verify $components is an array, some cache handlers return an object even though
* the original was a single object array.
*/
if (!is_array($components))
{
static::$components[$option] = $components;
}
else
{
static::$components = $components;
}
This has been tested with Cache_Lite only but please test as much as possible.
Labels |
Added:
?
|
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2015-02-10 23:41:10 |
Milestone |
Added: |
@test success on the same scenario I had the issue with before - not the same as above
https://www.dropbox.com/s/ack3jz1j4dhs3ke/6031.mp4?dl=0
This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6031.