Skip to content

Phalcon\Mvc\Model\Resultset\Simple::toArray() gives wrong result if empty #1377

Closed
@lunaticPenguin

Description

Phalcon\Mvc\Model\Resultset\Simple::toArray() method gives wrong result if empty.
It returns a correct array if not empty, and null if empty instead of an empty array (array()).

Here is the doc associated to the interface Phalcon\Mvc\Model\ResultsetInterface :

Returns a complete resultset as an array, if the resultset has a big number of rows
it could consume more memory than currently it does.
@return array
public function toArray();

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions