Quantcast
Channel: WordPress.org Forums » All Topics
Viewing all articles
Browse latest Browse all 59525

Missing array or object

$
0
0

Replies: 0

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’));
}


Viewing all articles
Browse latest Browse all 59525

Trending Articles