Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Undefined index: di #14639

Jeckerson opened this issue Dec 22, 2019 · 1 comment

[BUG]: Undefined index: di #14639

Jeckerson opened this issue Dec 22, 2019 · 1 comment


Copy link

@Jeckerson Jeckerson commented Dec 22, 2019

Describe the bug
QueryBuilder Paginator generate notice during paginate() call. Inside travis build.

PHP Notice:  Undefined index: di in /home/travis/build/phalcon/vokuro/src/Controllers/UsersController.php on line 59

To Reproduce
Steps to reproduce the behavior:

  1. Init builder via Criteria::fromInput()
  2. Pass created builder to Phalcon\Paginator\Adapter\QueryBuilder
  3. Call $paginator->paginate()

Provide minimal script to reproduce the issue

use Phalcon\Mvc\Model\Criteria;
use Phalcon\Paginator\Adapter\QueryBuilder as Paginator;
use Vokuro\Models\Users;

$builder = Criteria::fromInput($this->getDI(), Users::class, $this->request->getQuery());

$paginator = new Paginator([
    'builder'  => $builder->createBuilder(),
    'limit' => 10,
    'page'  => $this->request->getQuery('page', 'int', 1),

$this->view->setVar('page', $paginator->paginate()); // Here is PHP Notice

Expected behavior
Code runs without PHP Norice.


  • Phalcon version: 4.0.0
  • PHP Version: 7.2.24
  • Operating System: Ubuntu 18
  • Installation type: installing via package manager
  • Zephir version (if any):
  • Server: Other
  • Other related info (Database, table schema):

Additional context

@ruudboon ruudboon added the 4.0 label Dec 22, 2019
@ruudboon ruudboon self-assigned this Dec 22, 2019
ruudboon added a commit to ruudboon/cphalcon that referenced this issue Dec 22, 2019
@ruudboon ruudboon added Bug - Low and removed Bug - Unverified labels Dec 22, 2019
@ruudboon ruudboon mentioned this issue Dec 22, 2019
3 of 5 tasks complete
ruudboon added a commit that referenced this issue Dec 22, 2019
Added missing setDI. Fixes #14639

This comment has been minimized.

Copy link

@niden niden commented Dec 22, 2019


@niden niden closed this Dec 22, 2019
@niden niden added bug status: low and removed Bug - Low labels Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.