From: deepak-srivastava Date: Fri, 13 Mar 2015 21:54:01 +0000 (+0000) Subject: Warning Fix: call_user_func() expects parameter 1 to be a valid callback, second... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=deded1cfb54ada2b0a8cd9c1033b5cf2d80dff38;p=civicrm-core.git Warning Fix: call_user_func() expects parameter 1 to be a valid callback, second array member is not a valid method --- diff --git a/CRM/Core/Form/RecurringEntity.php b/CRM/Core/Form/RecurringEntity.php index e976659659..1a12dba4a4 100644 --- a/CRM/Core/Form/RecurringEntity.php +++ b/CRM/Core/Form/RecurringEntity.php @@ -412,11 +412,18 @@ class CRM_Core_Form_RecurringEntity { if (CRM_Utils_Array::value('pre_delete_func', CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]) && CRM_Utils_Array::value('helper_class', CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]) ) { - call_user_func(array( - CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['helper_class'], - call_user_func_array(CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['pre_delete_func'], array($params['entity_id'])), - ) + $preDeleteResult = call_user_func_array( + CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['pre_delete_func'], + array($params['entity_id']) ); + if (!empty($preDeleteResult)) { + call_user_func( + array( + CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]['helper_class'], + $preDeleteResult + ) + ); + } } //Ready to execute delete on entities if it has delete function set if (CRM_Utils_Array::value('delete_func', CRM_Core_BAO_RecurringEntity::$_recurringEntityHelper[$params['entity_table']]) &&