From 44e54f47242ccf95e730a0277015a9b2f3756d8e Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 13 Jun 2020 17:22:21 +1000 Subject: [PATCH] [REF] Fix another couple of uses of array_key_exists when the variable being checked is an object --- CRM/Core/Page/Basic.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Core/Page/Basic.php b/CRM/Core/Page/Basic.php index 0b784e25cd..097ba8b6c0 100644 --- a/CRM/Core/Page/Basic.php +++ b/CRM/Core/Page/Basic.php @@ -306,7 +306,7 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { $object_type = get_class($object); if (!$forceAction) { - if (array_key_exists('is_reserved', $object) && $object->is_reserved) { + if (property_exists($object, 'is_reserved') && $object->is_reserved) { $values['class'] = 'reserved'; // check if object is relationship type @@ -326,7 +326,7 @@ abstract class CRM_Core_Page_Basic extends CRM_Core_Page { } } else { - if (array_key_exists('is_active', $object)) { + if (property_exists($object, 'is_active')) { if ($object->is_active) { if ($hasDisable) { $newAction += CRM_Core_Action::DISABLE; -- 2.25.1