diff --git a/framework/helper.class.php b/framework/helper.class.php index 854ff81b5b..5592d60fee 100644 --- a/framework/helper.class.php +++ b/framework/helper.class.php @@ -379,7 +379,7 @@ class helper extends baseHelper case 'bool': return (bool)$value; case 'array': - return array_filter((array)$value); + return array_filter((array)$value, function($var){return ($var === '0' || !empty($var));}); case 'object': return (object)$value; case 'datetime': diff --git a/module/productplan/control.php b/module/productplan/control.php index 54393f7143..f1e00636b6 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -70,7 +70,6 @@ class productplan extends control if(!empty($_POST)) { $planData = form::data()->get(); - if(empty($planData->branch)) $planData->branch = '0'; $planID = $this->productplan->create($planData, (int)$this->post->future); if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError())); $this->loadModel('action')->create('productplan', $planID, 'opened');