[Solved] Call to a member function add() on a non-object – error in Joomla
This was an error I received in Joomla Administrator panel. Whenever I try to post an article or upload a module, I got a white blank screen. There was no logs in the Apache error log. I have changed ‘error_reporting’ from ‘none’ to ‘development’ mode. After enabling ‘development mode’, I got the below error:
Fatal error: Call to a member function get() on a non-object in /home/$user/public_html/joomla/cache/storage/memcache.php on line 449
If you got this error, then you can follow the steps below which helped me to resolve the error.
In your Joomla Administrator panel, check
Global Configuration > System > Cache settings
Check if any cache is enabled. Even though you have disabled cache, memcache will be ON which is giving you this error.
You can manually disable Memcache in configuration.php. Change “public $cache_handler” from ‘memcache’ to ‘file’.
public $cache_handler = 'file';
This will fix the error.