Skip to content

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

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 === '') {

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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