Skip to content

Commit

Permalink
Issue #456: Only call prepareRow if $row is an array.
Browse files Browse the repository at this point in the history
commit d569551
Author: Peter Sieg <[email protected]>
Date:   Wed Apr 1 16:44:04 2015 -0400

    Only call prepareRow if $row is an array.
  • Loading branch information
chasingmaxwell authored and Mateu Aguiló Bosch committed Apr 14, 2015
1 parent 255ce09 commit cf2c518
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion plugins/formatter/hal_json/RestfulFormatterHalJson.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ public function prepare(array $data) {
$output = array();

foreach ($data as &$row) {
$row = $this->prepareRow($row, $output);
if (is_array($row)) {
$row = $this->prepareRow($row, $output);
}
}

$output[$curies_resource] = $data;
Expand Down

0 comments on commit cf2c518

Please sign in to comment.