From f07afda7c673c9beaad382eeaf4b19314759b2df Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Thu, 30 Apr 2015 12:10:00 +0200 Subject: [PATCH] Simplify code for json_encode(). --- src/View/JsonView.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/View/JsonView.php b/src/View/JsonView.php index 5af3d69e1ce..be1ad2f6baa 100644 --- a/src/View/JsonView.php +++ b/src/View/JsonView.php @@ -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); } }