Skip to content

Commit

Permalink
Merge branch 'master' into custom_auth
Browse files Browse the repository at this point in the history
  • Loading branch information
clayhinson committed Apr 4, 2012
2 parents 75d6232 + 8fc08a1 commit 322ef24
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/frapi/custom/Action/Resource.php
Expand Up @@ -80,6 +80,7 @@ public function executeGet()
)
),
);

return $this->toArray();
}

Expand Down
2 changes: 1 addition & 1 deletion src/frapi/library/Frapi/Action.php
Expand Up @@ -361,7 +361,7 @@ protected function getAcceptParam($key, $type = self::TYPE_STRING, $default = nu
*/
protected function getByKey(array $array, $key, $type = self::TYPE_STRING, $default = null, $error_name = null)
{
$param = isset($this->acceptParams[$key]) ? $this->acceptParams[$key] : $default;
$param = isset($array[$key]) ? $array[$key] : $default;

switch ($type) {
case self::TYPE_FILE;
Expand Down
5 changes: 4 additions & 1 deletion src/frapi/library/Frapi/Controller/Api.php
Expand Up @@ -243,7 +243,10 @@ public function processAction()
$e = $this->getActionInstance($this->getAction())
->setActionParams($this->getParams())
->setActionFiles($this->getFiles())
->setAcceptParams($this->options);
->setAcceptParams(
isset($this->options) && is_array($this->options)
? $this->options : array()
);

return $this;
}
Expand Down

0 comments on commit 322ef24

Please sign in to comment.