From: Coleman Watts Date: Tue, 5 Jan 2016 03:10:14 +0000 (-0500) Subject: CRM-14106 - Swap CRM_Utils_Array::value for empty() when cast to boolean X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=52f3b44beeb514000c2a0b6013802a901b1f0c56;p=civicrm-core.git CRM-14106 - Swap CRM_Utils_Array::value for empty() when cast to boolean --- diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index 1c0f840f11..edbfd0da54 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1668,7 +1668,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment 'groupName' => 'msg_tpl_workflow_event', 'valueName' => 'event_offline_receipt', 'contactId' => $contactID, - 'isTest' => (bool) CRM_Utils_Array::value('is_test', $this->_defaultValues), + 'isTest' => !empty($this->_defaultValues['is_test']), 'PDFFilename' => ts('confirmation') . '.pdf', ); diff --git a/CRM/Utils/Wrapper.php b/CRM/Utils/Wrapper.php index 5211aa68f7..29ace3332e 100644 --- a/CRM/Utils/Wrapper.php +++ b/CRM/Utils/Wrapper.php @@ -62,10 +62,10 @@ class CRM_Utils_Wrapper { public function run($formName, $formLabel = NULL, $arguments = NULL) { if (is_array($arguments)) { $mode = CRM_Utils_Array::value('mode', $arguments); - $imageUpload = (bool) CRM_Utils_Array::value('imageUpload', $arguments, FALSE); - $addSequence = (bool) CRM_Utils_Array::value('addSequence', $arguments, FALSE); - $attachUpload = (bool) CRM_Utils_Array::value('attachUpload', $arguments, FALSE); - $ignoreKey = (bool) CRM_Utils_Array::value('ignoreKey', $arguments, FALSE); + $imageUpload = !empty($arguments['imageUpload']); + $addSequence = !empty($arguments['addSequence']); + $attachUpload = !empty($arguments['attachUpload']); + $ignoreKey = !empty($arguments['ignoreKey']); } else { $arguments = array();