diff --git a/CRM/Civirules/Delay/XWeekDay.php b/CRM/Civirules/Delay/XWeekDay.php index 5f7ea10125a6c9d60b9779ed1e7adfa073245e39..643e374526cc57ffe8cbfb7914ba1565a53f0e28 100644 --- a/CRM/Civirules/Delay/XWeekDay.php +++ b/CRM/Civirules/Delay/XWeekDay.php @@ -13,7 +13,7 @@ class CRM_Civirules_Delay_XWeekDay extends CRM_Civirules_Delay_Delay { public function delayTo(DateTime $date) { $d = clone $date; $d->modify('-30 minutes'); - $mod = $this->day.' of this week'; + $mod = $this->day.' this week'; $date->modify($mod); $date->setTime((int) $this->time_hour, (int) $this->time_minute); if ($date <= $d) { diff --git a/CRM/CivirulesConditions/FieldValueComparison.php b/CRM/CivirulesConditions/FieldValueComparison.php index a8b8c0246f30973be103b0b4370f12d39cc1a629..6099917f65505e30446a52bf4e3d167ad459096f 100644 --- a/CRM/CivirulesConditions/FieldValueComparison.php +++ b/CRM/CivirulesConditions/FieldValueComparison.php @@ -37,7 +37,7 @@ class CRM_CivirulesConditions_FieldValueComparison extends CRM_CivirulesConditio } protected function normalizeValue($value) { - if (value === null) { + if ($value === null) { return null; } diff --git a/CRM/CivirulesConditions/Utils/Period.php b/CRM/CivirulesConditions/Utils/Period.php index b6e85598c668a3eb6bfc4d7f3a1518fe69ec955d..f6fc8f50039b031d6942a2734303dcffa992aed9 100644 --- a/CRM/CivirulesConditions/Utils/Period.php +++ b/CRM/CivirulesConditions/Utils/Period.php @@ -252,7 +252,7 @@ class CRM_CivirulesConditions_Utils_Period { */ public static function convertPeriodToStartDate($condition_params) { $period = $condition_params['period']; - $replaceParameters = $condition_params['replaceParameters']; + $replaceParameters = isset($condition_params['replaceParameters']) ? $condition_params['replaceParameters'] : array(); $date = new DateTime(); switch ($period) { case 'this month': @@ -317,7 +317,7 @@ class CRM_CivirulesConditions_Utils_Period { */ public static function convertPeriodToEndDate($condition_params) { $period = $condition_params['period']; - $replaceParameters = $condition_params['replaceParameters']; + $replaceParameters = isset($condition_params['replaceParameters']) ? $condition_params['replaceParameters'] : array(); $date = new DateTime(); switch ($period) { case 'this month':