Skip to content

ZeDb\TableGateway::_getLikeResultSet() fails if no limit and order set #3

@HQJaTu

Description

@HQJaTu

Error:
Zend\Db\Sql\Select::limit expects parameter to be numeric, "NULL" given

Current code:

            $select->limit(($limit === null ? null : 1 * $limit));
            $select->offset(($offset === null ? null : 1 * $offset));

Fix:

            if ($limit !== null) {
                $select->limit(1 * $limit);
            }
            if ($offset !== null) {
                $select->offset(1 * $offset);
            }

That makes the thing work again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions