Skip to content

Commit

Permalink
- fixed issue where json response 'integer' strings turned into integ…
Browse files Browse the repository at this point in the history
…ers (issue chriskacerguis#244)
  • Loading branch information
Jarrett Chisholm committed Sep 30, 2013
1 parent 9413b8b commit 58955e5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions application/libraries/Format.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,11 +210,7 @@ public function to_csv()
// Encode as JSON
public function to_json()
{
if (strnatcmp(phpversion(),'5.3.3') >= 0) {
return json_encode($this->_data, JSON_NUMERIC_CHECK);
} else {
return json_encode($this->_data);
}
return json_encode($this->_data);
}

// Encode as Serialized array
Expand Down

0 comments on commit 58955e5

Please sign in to comment.