We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Paginator crash 1.3.3. phalcon


$builder = new \Phalcon\Mvc\Model\Query\Builder;
$builder->addfrom('Events\Models\Events', 'event')
                ->leftjoin('Events\Models\EventsLang', 'event.id = lang.object_id' , 'lang')
                ->where('users_id = '.$user['id'].' and (super_parent_id <> 35 or event_type_id <> 8)');
$paginator = new \Phalcon\Paginator\Adapter\QueryBuilder(array(
            "builder" => $builder,
            "limit" => $get_params["limit"],
            "page" => $get_params["page"],
$paginator = $paginator->getPaginate();

When paginator calls getPaginate() method it show

Undefined index 0 in line where it was called, and
Model " could not be loaded

But when builder is made without alias all works fine, but when uses Alias it crashes.

Cant get more information, because downgraded back Phalcon. Some minor updates were made on Ubuntu system.

Maybe Phalcon have some word to say?


I think this is fixed in 1.3.4, could you try again with that version? https://github.com/phalcon/cphalcon/pull/2842

Confirmed - the bug only occurs in 1.3.3.

I I am also getting this error despite following the instructions https://github.com/phalcon/cphalcon/pull/2842