Skip to content

ArraySource: Find with empty field condition returns all records #117

@liviakuenzli

Description

@liviakuenzli

Situation: An array-based countries table with no record with country_iso_3_code being empty.

$result = $countryModel->find('list',
	array(
		'conditions' => array('country_iso_3_code' => ''),
	)
);

Expected $result to be empty, but it holds all entries of the table.

The following line is probably the culprint:

if ($value === '') {

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions