Kaynağa Gözat

fix for php8.1

walkor 4 yıl önce
ebeveyn
işleme
12f9367d02
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      Protocols/Http/Request.php

+ 2 - 1
Protocols/Http/Request.php

@@ -163,7 +163,8 @@ class Request
     public function cookie($name = null, $default = null)
     {
         if (!isset($this->_data['cookie'])) {
-            \parse_str(\str_replace('; ', '&', $this->header('cookie')), $this->_data['cookie']);
+            $this->_data['cookie'] = array();
+            \parse_str(\str_replace('; ', '&', $this->header('cookie', '')), $this->_data['cookie']);
         }
         if ($name === null) {
             return $this->_data['cookie'];