]> git.mxchange.org Git - friendica.git/blobdiff - src/Core/System.php
Remove code parameter from HTTPException constructor
[friendica.git] / src / Core / System.php
index 69d15a176465636549913a0816f81815f5eeb985..83c3dc908167fa6091f304c6e5203a7bd4f03962 100644 (file)
@@ -23,7 +23,7 @@ class System extends BaseObject
        /**
         * @brief Retrieves the Friendica instance base URL
         *
-        * @param bool $ssl Whether to append http or https under SSL_POLICY_SELFSIGN
+        * @param bool $ssl Whether to append http or https under BaseURL::SSL_POLICY_SELFSIGN
         * @return string Friendica server base URL
         * @throws InternalServerErrorException
         */
@@ -176,6 +176,12 @@ class System extends BaseObject
                exit();
        }
 
+       public static function jsonError($httpCode, $data, $content_type = 'application/json')
+       {
+               header($_SERVER["SERVER_PROTOCOL"] . ' ' . $httpCode);
+               self::jsonExit($data, $content_type);
+       }
+
        /**
         * @brief Encodes content to json.
         *