#71566ObjectAcess with combination of LazyLoadingProxy fails to fetch bool properties
Description
Hi,
I have a situation, when an object, validated by GenericObjectValidator contains @lazy relation to another object, which itself contains boolean value, fetched by is*() method.
Simplified code:
class MyObject
{
/**
* @var \Vendor\Relation
* @lazy
*/
protected $relation;
...
}
class Relation
{
/**
* @var boolean
*/
protected $boolean;
public function isBoolean()
{
return $this->boolean;
}
}
When ‘MyObject’ is validated, due to recursive validation ‘Relation’ is also validated. But at the moment of validation the relation is substituted with LazyLoadingProxy. And, when ObjectAccess asks is_callable(array($proxy, 'getBoolean')) in getPropertyInternal(), it receives true, because it is callable on Proxy, but in fact it is not callable on original object and a PHP error occurs.
Reviews 2
History 39
-
Viktor Livakivskyi commented <span data-processor="relativetime" data-value="2015-11-13T18:43:53+00:00" > 11/13/15, 18:43 </span>
-
Viktor Livakivskyi commented <span data-processor="relativetime" data-value="2016-10-10T15:52:53+00:00" > 10/10/16, 15:52 </span>
Another issue related to this: in case
Relationobject contains some property, which starts from underscore and doesn’t have public->get...()method, a similar Exception will appear.When using no LazyLoadingProxy, property is correctly validated.
E.g.
class Relation { /** * @var \TYPO3\CMS\Extbase\Persistence\ObjectStorage */ protected $_myStorage; } -
Gerrit Code Review pushed patch set 1 for main to change 95441 status
NewUnder Review <span data-processor="relativetime" data-value="2026-08-26T23:10:43+00:00" > 08/26/26, 23:10 </span> -
Gerrit Code Review pushed patch set 2 for main to change 95441 <span data-processor="relativetime" data-value="2026-09-02T05:58:40+00:00" > 09/02/26, 05:58 </span>
-
Gerrit Code Review pushed patch set 1 for 14.3 to change 95542 <span data-processor="relativetime" data-value="2026-09-02T06:12:37+00:00" > 09/02/26, 06:12 </span>
-
Gerrit Code Review pushed patch set 3 for main to change 95441 <span data-processor="relativetime" data-value="2026-09-02T06:45:16+00:00" > 09/02/26, 06:45 </span>
-
Gerrit Code Review pushed patch set 4 for main to change 95441 <span data-processor="relativetime" data-value="2026-09-02T07:01:01+00:00" > 09/02/26, 07:01 </span>
-
Gerrit Code Review pushed patch set 5 for main to change 95441 <span data-processor="relativetime" data-value="2026-09-02T08:05:44+00:00" > 09/02/26, 08:05 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-09-02T09:10:09+00:00" > 09/02/26, 09:10 </span>Applied in changeset commit:7355a72d85461cee985c0e5de5522d104c6d7f3c.
To be more precise, not PHP Error, but PHP Warning is emitted, but still it is not nice.