? Success

User tests: Successful: Unsuccessful:

avatar roland-d
roland-d
9 Feb 2015

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

TESTING

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;
            }
  1. Save the file
  2. Pack the files into a zip file again
  3. Go to Extensions -> Extension Manager -> Upload Package File
  4. Select the file you packed in step 16
  5. Click on Upload & Install
  6. Observe the update completes successfully

This has been tested with Cache_Lite only but please test as much as possible.

avatar roland-d roland-d - open - 9 Feb 2015
avatar joomla-cms-bot joomla-cms-bot - change - 9 Feb 2015
Labels Added: ?
avatar brianteeman
brianteeman - comment - 9 Feb 2015

@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.
avatar brianteeman brianteeman - test_item - 9 Feb 2015 - Tested successfully
avatar wilsonge wilsonge - change - 10 Feb 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-02-10 23:41:10
avatar wilsonge wilsonge - close - 10 Feb 2015
avatar wilsonge wilsonge - reference | - 10 Feb 15
avatar wilsonge wilsonge - merge - 10 Feb 2015
avatar wilsonge wilsonge - close - 10 Feb 2015
avatar wilsonge wilsonge - change - 10 Feb 2015
Milestone Added:
avatar roland-d roland-d - head_ref_deleted - 6 May 2015

Add a Comment

Login with GitHub to post a comment