File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ class Controller extends WebController
1717 */
1818 public function beforeAction ($ action )
1919 {
20- date_default_timezone_set ("America/Guayaquil " );
2120 Yii::$ app ->response ->format = Response::FORMAT_JSON ;
2221 Yii::$ app ->response ->headers ->add ('Content-Type ' , 'application/json ' );
2322 $ this ->enableCsrfValidation = false ;
@@ -30,13 +29,19 @@ public function beforeAction($action)
3029 public function afterAction ($ action , $ result )
3130 {
3231 $ result = parent ::afterAction ($ action , $ result );
33- if (is_null ($ result )) Yii::$ app ->response ->content = '' ;
32+ if (is_null ($ result )) {
33+ Yii::$ app ->response ->content = '' ;
34+ }
3435
3536 // Si no es un strign no validamos nada
36- if (!is_string ($ result )) return $ result ;
37+ if (!is_string ($ result )) {
38+ return $ result ;
39+ }
3740
3841 if (($ data = json_decode ($ result )) !== false ) {
39- if (is_object ($ data )) return $ data ;
42+ if (is_object ($ data )) {
43+ return $ data ;
44+ }
4045 }
4146
4247 // Si es un PDF lo mostramos ya no seteamos a json
You can’t perform that action at this time.
0 commit comments