diff --git a/src/ORM/ArrayList.php b/src/ORM/ArrayList.php index 83e448b93..c5c478326 100644 --- a/src/ORM/ArrayList.php +++ b/src/ORM/ArrayList.php @@ -604,7 +604,7 @@ class ArrayList extends ViewableData implements SS_List, Filterable, Sortable, L $firstRecord = $this->first(); - return is_array($firstRecord) ? array_key_exists($by, $firstRecord) : property_exists($by, $firstRecord ?? ''); + return is_array($firstRecord) ? array_key_exists($by, $firstRecord) : property_exists($firstRecord, $by ?? ''); } /**