Răsfoiți Sursa

Add responseCode() without CLI

Joanhey 6 ani în urmă
părinte
comite
fd8ff791b1
1 a modificat fișierele cu 3 adăugiri și 0 ștergeri
  1. 3 0
      Protocols/Http.php

+ 3 - 0
Protocols/Http.php

@@ -327,6 +327,9 @@ class Http
      */
     public static function responseCode($code) 
     {
+        if (NO_CLI) {
+            return \http_response_code($code);
+        }
         if (isset(HttpCache::$codes[$code])) {
             HttpCache::$status = "HTTP/1.1 $code " . HttpCache::$codes[$code];
             return $code;