File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -358,21 +358,21 @@ protected function _fire_method($method, $args)
358358 * @param array $data
359359 * @param null|int $http_code
360360 */
361- public function response ($ data = array () , $ http_code = null )
361+ public function response ($ data = null , $ http_code = null )
362362 {
363363 global $ CFG ;
364364
365- // If data is empty and not code provide, error and bail
366- if (empty ( $ data) && $ http_code === null )
365+ // If data is NULL and not code provide, error and bail
366+ if ($ data === NULL && $ http_code === null )
367367 {
368368 $ http_code = 404 ;
369369
370370 // create the output variable here in the case of $this->response(array());
371371 $ output = NULL ;
372372 }
373373
374- // If data is empty but http code provided, keep the output empty
375- else if (empty ( $ data) && is_numeric ($ http_code ))
374+ // If data is NULL but http code provided, keep the output empty
375+ else if ($ data === NULL && is_numeric ($ http_code ))
376376 {
377377 $ output = NULL ;
378378 }
You can’t perform that action at this time.
0 commit comments