[BUG]: Cant get all cookies
Describe the bug I use cookies :) Soo... if i try to get them all with getCookies function- get empty array. If i retrieve cookie by name, all its fine.
To Reproduce
Steps to reproduce the behavior:
$this->cookies->set('test', 'test');
var_dump($this->cookies->get('test'); // Works
var_dump($this->cookies->getCookies()); // return empty array
Expected behavior
Array with all set cookies.
I have create a few more test and in some situation- example code from top is working. Will investigate more.
Anyway- this warning appear: Deprecated: Phalcon\Http\Cookie::setDomain(): Passing null to parameter #1 ($domain) of type string is deprecated in and i think must be fixed.
Details
- Phalcon version: 5.8.0
- PHP Version: 8.3.7
- Operating System: Windows
- Server: Apache
I'm not able to verify the specific bug, will probably need a more detailed example, I used the same 3 lines in a controller and worked as expected.
However, looking at the source code, the deprecated warning seem very likely to happen due to type strictness.
https://github.com/phalcon/cphalcon/blob/83677f1df8dde17946eee54ddbc900c8839c2b53/phalcon/Http/Cookie.zep#L510 https://github.com/phalcon/cphalcon/blob/83677f1df8dde17946eee54ddbc900c8839c2b53/phalcon/Http/Response/Cookies.zep#L255
Will try to figure out the issue and will poke when i get it. Thank you 👍