Bug #39969

Call to undefined method on Cookie from Response

Added by Pablo Delgado almost 3 years ago. Updated almost 3 years ago.

Status:Rejected Start date:2012-08-19
Priority:Must have Due date:
Assigned To:Pablo Delgado % Done:

0%

Category:Http
Target version:TYPO3 Flow Base Distribution - 1.1.1
PHP Version:5.3 Complexity:no-brainer
Has patch:No Affected Flow version:Git 1.2 (master)

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     }

History

#1 Updated by Pablo Delgado almost 3 years ago

  • Assigned To set to Pablo Delgado

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

#2 Updated by Christian Müller almost 3 years ago

  • Status changed from New to Rejected

#3 Updated by Christian Müller almost 3 years ago

On Request of Pablo it was dropped.

Also available in: Atom PDF