Skip to content

property_exists() function checks the existence of a property independent of accessibility #90

@pepamartinec

Description

@pepamartinec

I've got data objects defined with private properties and respective getters/setters

class DataObject
{
private $ID;

public function getID() { return $this->ID; }
public function setID( $value ) { $this->ID = $value; }
}

Twig_Template->getAttribute() method uses property_exists() function to check whether required attribute is object property. But since PHP 5.3 property_exists() checks the existence of a property independent of accessibility. So script hangs on private property access instead of using public getter method.

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