Skip to content
Snippets Groups Projects
Commit 70a2338c authored by Jared Hancock's avatar Jared Hancock
Browse files

api: Handle ArrayObject like an array for request validation

parent 7044ac71
No related branches found
No related tags found
No related merge requests found
......@@ -245,7 +245,7 @@ class ApiController {
global $ost;
foreach ($data as $key=>$info) {
if (is_array($structure) and is_array($info)) {
if (is_array($structure) && (is_array($info) || $info instanceof ArrayAccess)) {
$search = (isset($structure[$key]) && !is_numeric($key)) ? $key : "*";
if (isset($structure[$search])) {
$this->validateRequestStructure($info, $structure[$search], "$prefix$key/", $strict);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment