Skip to content

exists() returns false if value is set to null #83

@robbiejackson

Description

@robbiejackson

While preparing some documentation for Joomla I noticed the following behaviour:

use Joomla\Registry\Registry;
...
$registry = new Registry();
$registry->set("x", null);
$exists = $registry->exists("x");  // returns false

I was rather surprised by this and just wanted to check if this was deliberate.

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