I've got a problem in the Controllers:
2020/03/11 13:25:35 [error] 1333#1333: *2994 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: model in /var/www/.../app/controllers/Admin/ProblemsController.php on line 74
PHP message: PHP Stack trace:
PHP message: PHP 1. {main}() /var/www/.../public/index.php:0
PHP message: PHP 2. Phalcon\Mvc\Application->handle() /var/www/.../public/index.php:38
PHP message: PHP 3. Phalcon\Mvc\Dispatcher->dispatch() /var/www/.../public/index.php:38
PHP message: PHP 4. Phalcon\Mvc\Dispatcher->callActionMethod() /var/www/.../public/index.php:38
PHP message: PHP 5. ...\Controllers\Admin\ProblemsController->listAction() /var/www/.../public/index.php:38
PHP message: PHP 6. Phalcon\Paginator\Adapter\Model->paginate() /var/www/.../app/controllers/Admin/ProblemsController.php:74
PHP message: PHP Warning: call_user_func() expects parameter 1 to be a valid callback, first array member is not a valid class name or object in /var/www/.../app/controllers/Admin/ProblemsController.php on line 74
PHP message: PHP Stack trace:
PHP message: PHP 1. {main}() /var/www/.../public/index.php:0
PHP message: PHP 2. Phalcon\Mvc\Application->handle() /var/www/.../public/index.php:38
PHP message: PHP 3. Phalcon\Mvc\Dispatcher->dispatch() /var/www/.../public/index.php:38
PHP message: PHP 4. Phalcon\Mvc\Dispatcher->callActionMethod() /var/www/.../public/index.php:38
PHP message: PHP 5. ...\Controllers\Admin\ProblemsController->listAction() /var/www/.../public/index.php:38
PHP message: PHP 6. Phalcon\Paginator\Adapter\Model->paginate() /var/www/.../app/controllers/Admin/ProblemsController.php:74
PHP message: PHP 7. call_user_func:{/var/www/.../app/controllers/Admin/ProblemsController.php:74}() /var/www/.../app/controllers/Admin/ProblemsController.php:74" while reading response header from upstream, client: 10.0.10.171, server: default_..., request: "GET /admin/problems/list HTTP/1.1", upstream: "fastcgi://unix:
the code of /ProblemsController.php
arround line 74:
use Phalcon\Paginator\Adapter\Model as Paginator;
...
public function listAction()
{
$numberPage = $this->request->getQuery("page", "int", 1);
$problems = Problems::find(array(
"active = :active:",
"bind" => ["active" => $active],
"order" => "id DESC"
));
$paginator = new Paginator(array(
'data' => $problems,
'limit' => 1000,
'page' => $numberPage
));
$this->view->page = $paginator->paginate(); // this line is line 74
}