"__call()" should be displayed only if $this->magicCall is true
This commit is contained in:
parent
d7db2452f1
commit
5b0f8787cf
@ -228,14 +228,15 @@ class PropertyAccessor implements PropertyAccessorInterface
|
||||
// we call the getter and hope the __call do the job
|
||||
$result[self::VALUE] = $object->$getter();
|
||||
} else {
|
||||
$methods = array($getter, $isser, $hasser, '__get');
|
||||
if ($this->magicCall) {
|
||||
$methods[] = '__call';
|
||||
}
|
||||
|
||||
throw new NoSuchPropertyException(sprintf(
|
||||
'Neither the property "%s" nor one of the methods "%s()", '.
|
||||
'"%s()", "%s()", "__get()" or "__call()" exist and have public access in '.
|
||||
'class "%s".',
|
||||
'Neither the property "%s" nor one of the methods "'. implode('()", "', $methods).'() '.
|
||||
'exist and have public access in class "%s".',
|
||||
$property,
|
||||
$getter,
|
||||
$isser,
|
||||
$hasser,
|
||||
$reflClass->name
|
||||
));
|
||||
}
|
||||
|
Reference in New Issue
Block a user