Skip to content

Commit 0e16eb6

Browse files
author
Chris Kacerguis
committed
Undo the changes from chriskacerguis#323 (It didn’t work on Objects, only Arrays)
1 parent e5c781a commit 0e16eb6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

application/libraries/Format.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ public function to_json()
227227
$callback = isset($_GET['callback']) ? $_GET['callback'] : '';
228228
if ($callback === '')
229229
{
230+
return json_encode($this->_data);
231+
232+
/* Had to take out this code, it doesn't work on Objects.
230233
$str = $this->_data;
231234
array_walk_recursive($str, function(&$item, $key)
232235
{
@@ -237,6 +240,7 @@ public function to_json()
237240
});
238241
239242
return json_encode($str);
243+
*/
240244
}
241245

242246
// we only honour jsonp callback which are valid javascript identifiers

0 commit comments

Comments
 (0)