#5917: Warnings when writing cookie
------------------------------+---------------------------------------------
Reporter: primeminister | Type: Bug
Status: new | Priority: Medium
Milestone: 1.2.x.x | Component: Core Libs
Version: RC4 | Severity: Normal
Keywords: | Php_version: PHP 5
Cake_version: 7945 |
------------------------------+---------------------------------------------
Sometimes (still don't know when en when not) I get a PHP warning because
a cookie file is being deleted. This warning is at line 292 when the real
unlink() function is called.
{{{
Error: Warning
Code: 2
Descr: Cannot modify header information - headers already sent by (output
started at /../cake_1.2.0.7945-rc4/cake/libs/file.php:292)
File: /../cake_1.2.0.7945-rc4/cake/libs/controller/components/cookie.php
Line: 364
}}}
Backtrace:
{{{
CookieComponent::__write("[mck][lang]", "nl") -
/../cake_1.2.0.7945-rc4/cake/libs/controller/components/cookie.php, line
364
CookieComponent::write("mck.lang", "nl", false, "6 months") -
/../cake_1.2.0.7945-rc4/cake/libs/controller/components/cookie.php, line
206
AppController::_languageHandling() - /../site/live/app_controller.php,
line 209
AppController::beforeFilter() - /../live/app_controller.php, line 44
Dispatcher::_invoke(array, array) -
/../cake_1.2.0.7945-rc4/cake/dispatcher.php, line 226
}}}
It is easily solved when putting a @ before unlink. Patch attached.
(RC4 and SVN)
--
Ticket URL: <https://trac.cakephp.org/ticket/5917>
CakePHP : The Rapid Development Framework for PHP <https://trac.cakephp.org/>
Cake is a rapid development framework for PHP which uses commonly known design
patterns like ActiveRecord, Association Data Mapping, Front Controller and MVC.
Our primary goal is to provide a structured framework that enables PHP users at
all levels to rapidly develop robust web applications, without any loss to
flexibility.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"tickets cakephp" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/tickets-cakephp?hl=en
-~----------~----~----~----~------~----~------~--~---