Skip to content

Entity exception in line 270 and 143 (current version). #780

Description

@nowackipawel

array_key_exists is not as perfect as we'd like to be :). So after updating my repo my project stopped working.
I think will be better at least to use:

system/Entity.php->mapProperty() : 270
if (!empty($this->_options['datamap']) && ( isset($this->_options['datamap'][$key]) || array_key_exists($key, $this->_options['datamap'])) )

and:
system/Entity.php->__get() : 147
else if (!empty($this->_options['casts']) && ( isset($this->_options['casts'][$key]) || array_key_exists($key, $this->_options['casts'])) )

instead of:

if (array_key_exists($key, $this->_options['datamap']))

and

else if (array_key_exists($key, $this->_options['casts']))

Anyway widely used in_array is not perfect as well.

/** Edited for previous backward compabillity ;-) **/

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions