cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

ErrorException: setcookie() expects at most 7 parameters, 8 given

Open mvanvu opened this issue 6 years ago • 5 comments

The issue when I use (new Phalcon\Debug)->listen(true, true) and delete a cookie name from CONTROLLER like below

if ($this->cookies->has('cms.site.language'))
{
          $this->cookies->delete('cms.site.language');
}

It works fine when $lowServerity === false

mvanvu avatar Dec 23 '19 03:12 mvanvu

Resolved in https://github.com/phalcon/cphalcon/pull/14647

Thank you @mvanvu

niden avatar Dec 23 '19 19:12 niden

Hello, warning keeps being printed if we do :

$cookie = $this->cookies->get('cms.site.language');
$cookie->delete();

mikacalvo avatar Jun 08 '20 15:06 mikacalvo

Hello, warning keeps being printed if we do :

$cookie = $this->cookies->get('cms.site.language');
$cookie->delete();

@mikacalvo What version of Phalcon and PHP are you using?

niden avatar Jun 08 '20 15:06 niden

I just did the migration PHP 7.4 with Phalcon 4.0. In our app's cacheService we were doing a get then a delete, I changed it for a delete with the key as parameter. I reported still the 'bug' just in case

mikacalvo avatar Jun 08 '20 16:06 mikacalvo

Checked out on clean installation. Phalcon v.4.0.x, v.4.1.x. Cannot reproduce, perhaps fixed already.

BeMySlaveDarlin avatar May 07 '21 20:05 BeMySlaveDarlin