phalcon/cphalcon · error · Phalcon\Paginator\Exceptions\InvalidBuilderInstance

Parameter 'builder' must be an instance of Phalcon\Mvc\Model

Error message

Parameter 'builder' must be an instance of Phalcon\Mvc\Model\Query\Builder

What it means

Error "Parameter 'builder' must be an instance of Phalcon\Mvc\Model\Query\Builder" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Paginator/Adapter/QueryBuilderCursor.zep:106

     *     'builder'      => null,
     *     'cursorColumn' => 'id',
     *     'cursor'       => null
     * ]
     */
    public function __construct(array config)
    {
        var builder, cursorColumn, cursor;

        if unlikely !isset config["limit"] {
            throw new MissingRequiredParameter("limit");
        }

        if unlikely !fetch builder, config["builder"] {
            throw new MissingRequiredParameter("builder");
        }

        if unlikely !(builder instanceof Builder) {
            throw new InvalidBuilderInstance();
        }

        if unlikely !fetch cursorColumn, config["cursorColumn"] {
            throw new MissingRequiredParameter("cursorColumn");
        }

        if unlikely typeof cursorColumn != "string" || empty cursorColumn {
            throw new InvalidCursorColumn();
        }

        let this->cursorColumn = cursorColumn;

        if fetch cursor, config["cursor"] {
            let this->cursor = cursor;
        }

        parent::__construct(config);

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Paginator/Adapter/QueryBuilderCursor.zep:106 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/f9d96e03a483bdab. Report an issue: GitHub.