Уже недею бьюсь над решением. Гугль ответа не дает
В модели модуля функция
public function __construct(PDO $pdoinst, $cat_id){ $this->arr_path_cats[] = $cat_id; $cat_id = $this->retParent($pdoinst, $cat_id); if($cat_id){ $this->__construct($pdoinst, $cat_id); } }
вызывает ошибку Unknown: Argument 1 passed to ModelModuleSitemap::__construct() must be an instance of PDO, instance of Registry given, called in /var/www/opencart/system/engine/loader.php on line 35
Если переместить функцию в контроллер или закомментировать строку $this->registry->set('model_' . str_replace('/', '_', $model), new $class($this->registry));
этой функции из /system/engine/loader.php
public function model($model) { $file = DIR_APPLICATION . 'model/' . $model . '.php'; $class = 'Model' . preg_replace('/[^a-zA-Z0-9]/', '', $model); if (file_exists($file)) { include_once($file); $this->registry->set('model_' . str_replace('/', '_', $model), new $class($this->registry)); } else { trigger_error('Error: Could not load model ' . $model . '!'); exit(); } }
, то ошибка исчезает
Возможно неправильно задана модель или присвоение регистра. При запуске скрипта вне модуля все отрабатывает нормально
Заранее благодарен за помощь