diff --git a/api/v1/entries/productplans.php b/api/v1/entries/productplans.php index f8313c1683..6fc0b0757e 100644 --- a/api/v1/entries/productplans.php +++ b/api/v1/entries/productplans.php @@ -24,7 +24,7 @@ class productplansEntry extends entry if(!$productID) return $this->sendError(400, 'No product id.'); $control = $this->loadController('productplan', 'browse'); - $control->browse($productID, $this->param('branch', 0), $this->param('status', 'all'), $this->param('order', 'begin_desc'), 0, $this->param('limit', 20), $this->param('page', 1)); + $control->browse($productID, $this->param('branch', 0), $this->param('status', 'all'), $this->param('query', 0), $this->param('order', 'begin_desc'), 0, $this->param('limit', 20), $this->param('page', 1)); /* Response */ $data = $this->getData(); diff --git a/framework/api/entry.class.php b/framework/api/entry.class.php index beadc3089a..5c89698e49 100644 --- a/framework/api/entry.class.php +++ b/framework/api/entry.class.php @@ -535,7 +535,7 @@ class baseEntry /* Format array. */ $value = array(); - if(is_array($object->$key)) + if(is_array($object->$key) or is_object($object->$key)) { foreach($object->$key as $v) $value[] = $this->cast($v, $type); }