Bug #39969

Call to undefined method on Cookie from Response

Added by Pablo Delgado about 9 years ago. Updated about 9 years ago.

Status:
Rejected
Priority:
Must have
Assignee:
Category:
Http
Start date:
2012-08-19
Due date:
% Done:

0%

Estimated time:
PHP Version:
5.3
Has patch:
No
Complexity:
no-brainer

Description

When the response headers are sent you get an 'call to undefined method getExpiresTime' error. The problem is in the Response.php on line 508. Its a simple fix either we change the 3rd parameter to $cookie->getExpires() or we hard an alias method to Cookie called Cookie::getExpiresTime().

I think for consistence we use the first option.

FILE: TYPO3.FLOW/Classes/Http/Resposne.php

491     /**
492      * Sends the HTTP headers.
493      *
494      * If headers have been sent previously, this method fails silently.
495      *
496      * @return void
497      * @codeCoverageIgnore
498      * @api
499      */
500     public function sendHeaders() {
501         if (headers_sent() === TRUE) {
502             return;
503         }
504         foreach ($this->renderHeaders() as $header) {
505             header($header);
506         }
507         foreach ($this->headers->getCookies() as $cookie) {
508             setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly(    )); 
509         }
510     }

#1

Updated by Pablo Delgado about 9 years ago

  • Assignee set to Pablo Delgado

Error please ignore this ticket. I was looking at the wrong branch.

#2

Updated by Christian Müller about 9 years ago

  • Status changed from New to Rejected
#3

Updated by Christian Müller about 9 years ago

On Request of Pablo it was dropped.

Also available in: Atom PDF