} else {
$data['micro_data']['special'] = false;
}
$data['micro_data']['price'] = (float)rtrim($product_info['price'], ".");
$data['micro_data']['currency'] = $this->session->data['currency'];
$reviews_all = $this->model_catalog_review->getReviewsByProductId($product_id);
foreach ($reviews_all as $result) {
$data['micro_data']['reviews_all'][] = [
'author' => htmlspecialchars($result['author']),
'text' => htmlspecialchars(strip_tags(str_replace("\r", " ", str_replace("\n", " ", str_replace("\\", "/", str_replace("\"", "", $result['text'])))))),
'rating' => (int)$result['rating'],
}
$reflection = new ReflectionClass($class);
if ($reflection->hasMethod($this->method) && $reflection->getMethod($this->method)->getNumberOfRequiredParameters() <= count($args)) {
return call_user_func_array(array($controller, $this->method), $args);
} else {
return new \Exception('Error: Could not call ' . $this->route . '/' . $this->method . '!');
}
}
}
Error |
---|
Error: Call to a member function getReviewsByProductId() on null at /home/newsnike/sniker.ua/storage_sniker/modification/catalog/controller/product/product.php:695 at ControllerProductProduct->index() (/home/newsnike/sniker.ua/storage_sniker/modification/system/engine/action.php:79) at Action->execute(object(Registry)) (/home/newsnike/sniker.ua/www/system/engine/router.php:67) at Router->execute(object(Action)) (/home/newsnike/sniker.ua/www/system/engine/router.php:56) at Router->dispatch(object(Action), object(Action)) (/home/newsnike/sniker.ua/www/system/framework.php:168) at require_once('/home/newsnike/sniker.ua/www/system/framework.php') (/home/newsnike/sniker.ua/www/system/startup.php:104) at start('catalog') (/home/newsnike/sniker.ua/www/index.php:19) |