Skip to content

Commit cf2c518

Browse files
chasingmaxwellMateu Aguiló Bosch
authored and
Mateu Aguiló Bosch
committed
Issue #456: Only call prepareRow if $row is an array.
commit d569551 Author: Peter Sieg <[email protected]> Date: Wed Apr 1 16:44:04 2015 -0400 Only call prepareRow if $row is an array.
1 parent 255ce09 commit cf2c518

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

plugins/formatter/hal_json/RestfulFormatterHalJson.class.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ public function prepare(array $data) {
3030
$output = array();
3131

3232
foreach ($data as &$row) {
33-
$row = $this->prepareRow($row, $output);
33+
if (is_array($row)) {
34+
$row = $this->prepareRow($row, $output);
35+
}
3436
}
3537

3638
$output[$curies_resource] = $data;

0 commit comments

Comments
 (0)