Missing array or object
-
Dear Shortpixel Team,
yesterday i started a new collective processing on my site and received following error:
Parameter must be an array or an object that implements Countable in *********************/wp-content/plugins/shortpixel-image-optimiser/shortpixel_api.php on line 91
Code is:
public function doRequests($URLs, $Blocking, $itemHandler, $compressionType = false, $refresh = false) {
if(!count($URLs)) {
$meta = $itemHandler->getMeta();
if(count($meta->getThumbsMissing())) {
$added = array();
$files = ” (“;
foreach ($meta->getThumbsMissing() as $miss) {
if(isset($added[$miss])) continue;
$files .= $miss . “, “;
$added[$miss] = true;
}
if(strrpos($files, ‘, ‘)) {
$files = substr_replace($files , ‘)’, strrpos($files , ‘, ‘));
}
throw new Exception(__(‘Image files are missing.’, ‘shortpixel-image-optimiser’) . (strlen($files) > 1 ? $files : ”));
}
else throw new Exception(__(‘Image files are missing.’, ‘shortpixel-image-optimiser’));
}The page I need help with: [log in to see the link]
- The topic ‘Missing array or object’ is closed to new replies.