CRM-16324 Scheduled jobs won't accept zero-valued parameters
authorKen West <ken.west@internode.on.net>
Mon, 20 Apr 2015 23:10:31 +0000 (09:10 +1000)
committerKen West <ken.west@internode.on.net>
Mon, 20 Apr 2015 23:10:31 +0000 (09:10 +1000)
CRM/Core/ScheduledJob.php

index 6872ba2365728cabb1cc057be8a0ae83c737fea2..3b3543493bfa3472af0a21b1b2d5a5828cfe2bbf 100644 (file)
@@ -67,7 +67,7 @@ class CRM_Core_ScheduledJob {
 
       foreach ($lines as $line) {
         $pair = explode("=", $line);
-        if (empty($pair[0]) || empty($pair[1])) {
+        if ($pair === false || count($pair) != 2 || trim($pair[0]) == '' || trim($pair[1]) == '') {
           $this->remarks[] .= 'Malformed parameters!';
           break;
         }