Bug #44087

Call to a member function setCookie()

Added by Kien Phuoc Ma over 2 years ago. Updated over 2 years ago.

Status:Resolved Start date:2012-12-18
Priority:Must have Due date:
Assigned To:Robert Lemke % Done:

100%

Category:Session
Target version:-
PHP Version: Complexity:
Has patch:No Affected Flow version:Git master

Description

i got a Fatal Error: Call to a member function setCookie()

use by

try { $this->authenticationManager->authenticate();
error_log('LOGGED_IN');
} catch (\TYPO3\Flow\Security\Exception\AuthenticationRequiredException $exception) {
error_log('LOGIN_FAILURE');
}

strace_cookie.txt Magnifier (6.9 kB) Kien Phuoc Ma, 2012-12-18 12:33


Related issues

duplicated by TYPO3.Flow - Bug #44086: Call to a member function setCookie() Closed 2012-12-18

Associated revisions

Revision 9a0715c2
Added by Robert Lemke over 2 years ago

[BUGFIX] Session: add safeguard against incompatible request handlers

This adds additional checks and throws an exception if a session should be
started but the currently active request handler does not implement the
HttpRequestHandlerInterface.

Change-Id: I511525f818fbde31b6a8c8793cb2f6519f46a6c2
Resolves: #44087
Releases: master, 2.0

Revision 27e892db
Added by Robert Lemke over 2 years ago

[BUGFIX] Session: add safeguard against incompatible request handlers

This adds additional checks and throws an exception if a session should be
started but the currently active request handler does not implement the
HttpRequestHandlerInterface.

Change-Id: I511525f818fbde31b6a8c8793cb2f6519f46a6c2
Resolves: #44087
Releases: master, 2.0

History

#1 Updated by Kien Phuoc Ma over 2 years ago

My Line 255 in Session.php = $this->response->setCookie($this->sessionCookie);

#2 Updated by Robert Lemke over 2 years ago

  • Category set to Session
  • Assigned To set to Robert Lemke

#3 Updated by Jochen Weber over 2 years ago

hello robert,

i figured out the problem.
just change line 606 of File TYPO3.Flow/Classes/TYPO3/Flow/Session/Session.php

from

if ($requestHandler instanceof HttpRequestHandlerInterface) {

to
if ($requestHandler instanceof \TYPO3\Flow\Core\RequestHandlerInterface) {

#4 Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19339

#5 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/19339

#6 Updated by Anonymous over 2 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100

#7 Updated by Gerrit Code Review over 2 years ago

  • Status changed from Resolved to Under Review

Patch set 1 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19595

#8 Updated by Gerrit Code Review over 2 years ago

Patch set 2 for branch 2.0 has been pushed to the review server.
It is available at https://review.typo3.org/19595

#9 Updated by Anonymous over 2 years ago

  • Status changed from Under Review to Resolved

Also available in: Atom PDF