Skip to content

Commit

Permalink
Simplify code for json_encode().
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Apr 30, 2015
1 parent 9445189 commit f07afda
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/View/JsonView.php
Expand Up @@ -177,9 +177,8 @@ protected function _serialize($serialize)
}

if (Configure::read('debug')) {
return json_encode($data, $jsonOptions | JSON_PRETTY_PRINT);
$jsonOptions = $jsonOptions | JSON_PRETTY_PRINT;
}

return json_encode($data, $jsonOptions);
}
}

0 comments on commit f07afda

Please sign in to comment.