Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Json output fix for CLI
givanz8497aae9d7ed
diff --git a/system/core/response.php b/system/core/response.phpindex 85c4ba2..56dd7fe 100755--- a/system/core/response.php+++ b/system/core/response.php@@ -72,7 +72,7 @@ class Response {}}- public function output($data = false) {+ public function output($data = null) {if ($this->done) {return false;}@@ -82,11 +82,11 @@ class Response {header("$header: $value", true);}}-- if ($this->type == 'text' && $data) {++ if ($this->type == 'text' && $data !== null) {echo $data;} else {- if ($this->type == 'json' && $data && (! defined('CLI'))) {+ if ($this->type == 'json' && $data !== null && (! defined('CLI'))) {if (is_array($data)) {echo json_encode($data);} else {