(ERROR @ /core/cache/includes/elements/modsnippet/12.include.cache.php : 48) PHP warning: Illegal string offset 'total'
$data = $modx->call('galItem','getList',array(&$modx,$scriptProperties)); $totalVar = $modx->getOption('totalVar', $scriptProperties, 'total'); $modx->setPlaceholder($totalVar,$data['total']);
$data = $modx->call('galItem','getList',array(&$modx,$scriptProperties)); $totalVar = $modx->getOption('totalVar', $scriptProperties, 'total'); /* this is new */ if (isset($data['total'])) { $modx->setPlaceholder($totalVar,$data['total']); }
I'm not sure where $data['total'] is supposed to come from. This will stop the error. It won't necessarily fix the problem, but it might:
$data = $modx->call('galItem','getList',array(&$modx,$scriptProperties)); $totalVar = $modx->getOption('totalVar', $scriptProperties, 'total'); /* this is new */ if (isset($data['total'])) { $modx->setPlaceholder($totalVar,$data['total']); }
Obviously, the change needs to be made in the snippet, not the cache.
[[*wgallery:notempty=`[[!Gallery? &album=`[[*wgallery]]` &plugin=`galleriffic`]]`]]