Project

General

Profile

Actions

Bug #58029

closed

6.2.1: TYPO3\CMS\Core\Authentication\AbstractUserAuthentication tries to call header() in CLI context

Added by Gabe Blair over 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
-
Target version:
Start date:
2014-04-17
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Starting in 6.2.1, if you try using the CLI dispatcher (assuming you've got your BE user set up, etc.), e.g.:

typo3/cli_dispatch.phpsh scheduler

... you get something like this back (markup removed for clarity:

caller: TYPO3\CMS\Core\Database\DatabaseConnection::exec_INSERTquery
ERROR: Column 'IP' cannot be null
lastBuiltQuery: INSERT INTO sys_log (userid,type,action,error,details_nr,details,IP,tstamp,workspace) VALUES ('0','5','0','1','0','Core: Error handler (BE): PHP Warning: Cannot modify header information - headers already sent by (output started at /Users/gblair/src/hammer/Source/typo3conf/ext/t3site/ext_tables.php:429) in /Users/gblair/src/hammer/Source/typo3_src/typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php line 493',NULL,'1397760691','-99')
debug_backtrace: TYPO3\CMS\Core\Core\Bootstrap->initializeBackendUser#57 // TYPO3\CMS\Core\Authentication\AbstractUserAuthentication->start#1000 // header#493 // TYPO3\CMS\Core\Error\ErrorHandler->handleError# // TYPO3\CMS\Core\Error\ErrorHandler->writeLog#147 // TYPO3\CMS\Core\Database\DatabaseConnection->exec_INSERTquery#200 // TYPO3\CMS\Core\Database\DatabaseConnection->debug#215

Looks like AbstractUserAuthentication::start() tries to send HTTP headers, which throws an exception (or warning, maybe?) that can't be logged because user has no ip address (a different can of worms?). A quick check for CLI context before sending header() output seems to do the trick to work around this. I'll see if I can get a patch submitted.

Actions

Also available in: Atom PDF