From 6767aa00a6042fd303d5fec7323539076aa6e739 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 23 Jan 2014 22:22:28 -0800 Subject: [PATCH] CRM-14106 - Fix treating object as array --- CRM/Core/Component.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Core/Component.php b/CRM/Core/Component.php index 1bb5569b0f..9c76095969 100644 --- a/CRM/Core/Component.php +++ b/CRM/Core/Component.php @@ -308,12 +308,15 @@ class CRM_Core_Component { return CRM_Core_DAO::$_nullObject; } + /** + * FIXME: This function does not appear to do anything. The is_array() check runs on a bunch of objects and (always?) returns false + */ static function &taskList() { $info = self::_info(); $tasks = array(); foreach ($info as $name => $value) { - if (!empty($info[$name]['task'])) { + if (is_array($info[$name]) && isset($info[$name]['task'])) { $tasks += $info[$name]['task']; } } -- 2.25.1