Merge branch 'sprint/scx_api' into 'master'
* Fix api bug. See merge request easycorp/zentaopms!4628
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user