Error

HTTP 500 Whoops, looks like something went wrong.

Call to a member function getReviewsByProductId() on null

Exception

Error

  1.             } else {
  2.                 $data['micro_data']['special'] = false;
  3.             }
  4.             $data['micro_data']['price'] = (float)rtrim($product_info['price'], ".");
  5.             $data['micro_data']['currency'] = $this->session->data['currency'];
  6.             $reviews_all $this->model_catalog_review->getReviewsByProductId($product_id);
  7.             foreach ($reviews_all as $result) {
  8.                 $data['micro_data']['reviews_all'][] = [
  9.                     'author'     => htmlspecialchars($result['author']),
  10.                     'text'       => htmlspecialchars(strip_tags(str_replace("\r"" "str_replace("\n"" "str_replace("\\""/"str_replace("\""""$result['text'])))))),
  11.                     'rating'     => (int)$result['rating'],
  1.         }
  2.         
  3.         $reflection = new ReflectionClass($class);
  4.         
  5.         if ($reflection->hasMethod($this->method) && $reflection->getMethod($this->method)->getNumberOfRequiredParameters() <= count($args)) {
  6.             return call_user_func_array(array($controller$this->method), $args);
  7.         } else {
  8.             return new \Exception('Error: Could not call ' $this->route '/' $this->method '!');
  9.         }
  10.     }
  11. }
Action->execute(object(Registry)) in /home/newsnike/sniker.ua/www/system/engine/router.php (line 67)
  1.      *
  2.      * @param    object    $action
  3.      * @return    object
  4.      */
  5.     private function execute(Action $action) {
  6.         $result $action->execute($this->registry);
  7.         if ($result instanceof Action) {
  8.             return $result;
  9.         } 
  10.         
Router->execute(object(Action)) in /home/newsnike/sniker.ua/www/system/engine/router.php (line 56)
  1.                 break;
  2.             }
  3.         }
  4.         while ($action instanceof Action) {
  5.             $action $this->execute($action);
  6.         }
  7.     }
  8.     
  9.     /**
  10.      * 
Router->dispatch(object(Action), object(Action)) in /home/newsnike/sniker.ua/www/system/framework.php (line 168)
  1.         $route->addPreAction(new Action($value));
  2.     }
  3. }
  4. // Dispatch
  5. $route->dispatch(new Action($config->get('action_router')), new Action($config->get('action_error')));
  6. // Output
  7. $response->output();
require_once('/home/newsnike/sniker.ua/www/system/framework.php') in /home/newsnike/sniker.ua/www/system/startup.php (line 104)
  1. // Helper
  2. require_once(DIR_SYSTEM 'helper/general.php');
  3. require_once(DIR_SYSTEM 'helper/utf8.php');
  4. function start($application_config) {
  5.     require_once(DIR_SYSTEM 'framework.php');    
  6. }
start('catalog') in /home/newsnike/sniker.ua/www/index.php (line 19)
  1. }
  2. // Startup
  3. require_once(DIR_SYSTEM 'startup.php');
  4. start('catalog');

Stack Trace

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)