TOPIC: Notice in jotcache.php on line 64

Notice in jotcache.php on line 64 18 Feb 2015 20:23 #1221

I just updated to the current version of jotcache 5.0.8 and found that the following notice is also present in this version:

Notice: Trying to get property of non-object in joomla336\plugins\system\jotcache\jotcache.php on line 64

Just wanted to let you know. Thanks for your work!

Joomla version : 3.3
JotCache version : 5.0.8
site template: protostar
system plugins : plain vanilla joomla installation with jotcache
The administrator has disabled public write access.

Re: Notice in jotcache.php on line 64 19 Feb 2015 12:37 #1222

I changed this line
$storage = $this->params->get('storage', $default);
to
$storage->type = $this->params->get('storage', $default);
The administrator has disabled public write access.

Re: Notice in jotcache.php on line 64 19 Feb 2015 13:43 #1223

Sorry, your patch is wrong - it is not working for memcache/memcached storage selection.

Original code (lines 58-64):
);$default = new stdClass;
$default->type = 'file';
if (isset($this->params) && $this->params->exists('storage')) {
$storage = $this->params->get('storage', $default);
} else {
$storage = $default;
}switch ($storage->type) {
have to be replaced by :
);$storage = new stdClass;
$storage->type = 'file';
if (isset($this->params) && $this->params->exists('storage')) {
$storage = $this->params->get('storage', $storage);
}switch ($storage->type) {
Note : $this->params->get('storage', $default) is returning object and not single string
The administrator has disabled public write access.

Re: Notice in jotcache.php on line 64 19 Feb 2015 14:26 #1224

You are right. Thanks!
The administrator has disabled public write access.

Re: Notice in jotcache.php on line 64 27 Mar 2015 12:53 #1331

I have the same problemen and tried the solution, but it doesn't work. I get the same error, only difference is line 62 instead of 64.

Joomla version : 3.4
JotCache version : 5.1.0
site template: Yootheme Nano2
system plugins :
The administrator has disabled public write access.
Time to create page: 0.209 seconds
We have 94 guests and no members online
Copyright © 2015 JotComponents
We have 94 guests and no members online
Copyright © 2017 JotComponents