walkor преди 4 години
родител
ревизия
12f9367d02
променени са 1 файла, в които са добавени 2 реда и са изтрити 1 реда
  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'];