Skip to content

Commit

Permalink
Fix illegal string offset in spyc component
Browse files Browse the repository at this point in the history
  • Loading branch information
kinglozzer authored and Sam Minnee committed Apr 5, 2017
1 parent cca7e96 commit 82f62c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion thirdparty/spyc/spyc.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ private function addArray ($incoming_data, $incoming_indent) {

$_arr = array_merge ($_arr, $value);
} else if ($key || $key === '') {
$_arr[$key] = $value;
if (!is_array ($_arr)) { $_arr = array ($key=>$value); }
else { $_arr[$key] = $value; }
} else {
if (!is_array ($_arr)) { $_arr = array ($value); $key = 0; }
else { $_arr[] = $value; end ($_arr); $key = key ($_arr); }
Expand Down

0 comments on commit 82f62c8

Please sign in to comment.