Skip to content

Calling initDefaults breaks data retrieving in develop branch #85

@janedbal

Description

@janedbal
/**
 * @property null|string $firstname
 * @property string $surname
 */
class User extends LeanMapper\Entity {
    protected function initDefaults() {
        $this->firstname = NULL;
    }
}

////////

$user = new User([
    'firstname' => 'Vojtěch',
    'surname' => 'Kohout',
]);

echo $user->firstname; // returns NULL
echo $user->surname;

Tested on a9d83b5, master branch is ok.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions