alexlcdee hace 7 años
padre
commit
6305f05173
Se han modificado 1 ficheros con 1 adiciones y 5 borrados
  1. 1 5
      src/web/Response.php

+ 1 - 5
src/web/Response.php

@@ -51,11 +51,7 @@ class Response extends \CApplicationComponent
     {
         if ($this->format === static::FORMAT_JSON) {
             header('Content-type: application/json; charset=utf-8');
-            $options = 0;
-            if (YII_DEBUG) {
-                $options |= JSON_PRETTY_PRINT;
-            }
-            $this->_result = json_encode($this->_result, $options);
+            $this->_result = \CJSON::encode($this->_result);
         }
         if ($this->format === static::FORMAT_XML) {
             header('Content-type: application/xml; charset=utf-8');