Issue Bug Closed

#91784Extbase ObjectAcces::isPropertyGettable ArrayAccess logic breaks usability

Till Wimmer 07/12/20, 20:06 updated 07/06/23, 15:08

Description

Hi there,

Since commit 2a4dcbad895 the logic to check if a property is gettable is somehow reversed…

This implies that a model class implementing ArrayAccess solely has properties which are accessible as array offsets:

    if (($object instanceof \ArrayAccess) && !$object->offsetExists($propertyName)) {
        return false;
    }

This makes it impossible to use the ArrayAccess Interface only for a few properties like in earlier versions. This was handy i.e. to implement some “magic” getters in Fluid.

Reviews 2