Bug #77270
closedMissing argument 1 for TypoScriptFrontendController::__construct
0%
Description
I get this PHP warnings:
Core: Error handler (FE): PHP Warning: Missing argument 1 for TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::__construct(), called in /home/myuser/public_html/neu/typo3_src-7.6.10/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4533 and defined in /home/myuser/public_html/neu/typo3_src-7.6.10/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php line 902
The calling path is this:
call_user_func#34 // {closure}# // TYPO3\CMS\Frontend\Http\Application->run#33 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#78 // TYPO3\CMS\Frontend\Http\RequestHandler->handleRequest#302 // TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->handleDataSubmission#196 // TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj#2868 // TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance#4455 // TYPO3\CMS\Core\Utility\GeneralUtility::instantiateClass#4514 // TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->__construct#4533 // TYPO3\CMS\Core\Error\ErrorHandler->handleError#902 // TYPO3\CMS\Core\Error\ErrorHandler->writeLog#147 // Geithware\DebugMysqlDb\Database\DatabaseConnection->exec_INSERTquery#213 // Geithware\DebugMysqlDb\Database\DatabaseConnection->myDebug#170
Updated by Markus Klein over 8 years ago
- Status changed from New to Needs Feedback
Must be some extension causing this.
The call happens inside handleDataSubmission()
, which only calls hooks registered in TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission']
.
Updated by Andreas Kienast over 8 years ago
Please check whether Geithware\DebugMysqlDb\Database\DatabaseConnection
instanciates TSFE and if so, it obviously does it wrong.
Updated by Franz Holzinger over 8 years ago
The call comes from here:
index.php 34 call_user_func index.php 33 run Application.php 78 handleRequest Bootstrap.php 302 handleRequest RequestHandler.php 196 handleDataSubmission TypoScriptFrontendController.php 2868 getUserObj GeneralUtility.php 4455 makeInstance GeneralUtility.php 4514 instantiateClass GeneralUtility.php 4535 __construct TypoScriptFrontendController.php 902 handleError ErrorHandler.php 140 setTSlogMessage TimeTracker.php 198 getIcon IconFactory.php 117 makeInstance GeneralUtility.php 4514 instantiateClass GeneralUtility.php 4531 debug TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider instantiateClass $className index.php 34 call_user_func index.php 33 run Application.php 78 handleRequest Bootstrap.php 302 handleRequest RequestHandler.php 196 handleDataSubmission TypoScriptFrontendController.php 2868 getUserObj GeneralUtility.php 4455 makeInstance GeneralUtility.php 4514 instantiateClass GeneralUtility.php 4535 __construct TypoScriptFrontendController.php 902 handleError ErrorHandler.php 140 setTSlogMessage TimeTracker.php 198 getIcon IconFactory.php 117 makeInstance GeneralUtility.php 4514 instantiateClass GeneralUtility.php 4532 debug Array 0 TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider instantiateClass $arguments index.php 34 call_user_func index.php 33 run Application.php 78 handleRequest Bootstrap.php 302 handleRequest RequestHandler.php 196 handleDataSubmission TypoScriptFrontendController.php 2868 getUserObj GeneralUtility.php 4455 makeInstance GeneralUtility.php 4514 instantiateClass GeneralUtility.php 4535 __construct TypoScriptFrontendController.php 902 handleError ErrorHandler.php 147 writeLog ErrorHandler.php 213 exec_INSERTquery DatabaseConnection.php 170 myDebug DatabaseConnection.php 817 callDebugger Array function/mode Pg329 exec_INSERTquery(sys_log) - TypoScriptFrontendController.php#902->handleError // ErrorHandler.php#147->writeLog // ErrorHandler.php#213->exec_INSERTquery SQL query INSERT INTO sys_log (userid,type,action,error,details_nr,details,log_data,IP,tstamp,workspace) VALUES ('1','5','0','1','0','Core: Error handler (FE): PHP Warning: Missing argument 1 for TYPO3\\CMS\\Frontend\\Controller\\TypoScriptFrontendController::__construct(), called in /home/myuser/public_html/neu/typo3_src-7.6.10/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4535 and defined in /home/myuser/public_html/neu/typo3_src-7.6.10/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php line 902','','91.119.60.120','1469624339','0') affected_rows() Integer 1 insert_id() Integer 80 debug_backtrace call_user_func#34 // {closure}# // TYPO3\CMS\Frontend\Http\Application->run#33 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#78 // TYPO3\CMS\Frontend\Http\RequestHandler->handleRequest#302 // TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->handleDataSubmission#196 // TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj#2868 // TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance#4455 // TYPO3\CMS\Core\Utility\GeneralUtility::instantiateClass#4514 // TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController->__construct#4535 // TYPO3\CMS\Core\Error\ErrorHandler->handleError#902 // TYPO3\CMS\Core\Error\ErrorHandler->writeLog#147 // Geithware\DebugMysqlDb\Database\DatabaseConnection->exec_INSERTquery#213 // Geithware\DebugMysqlDb\Database\DatabaseConnection->myDebug#170 miliseconds Double 190.786 ------------ SQL debug
GeneralUtility:
protected static function instantiateClass($className, $arguments) { debug ($className, 'instantiateClass $className'); debug ($arguments, 'instantiateClass $arguments'); switch (count($arguments)) { case 1: $instance = new $className(); break; case 2: $instance = new $className($arguments[1]); break;
$arguments has a value with index 0 and no value with index 1.
Array 0 TYPO3\CMS\Core\Imaging\IconProvider\FontawesomeIconProvider instantiateClass $arguments
count($arguments) gives '1'. So the first switch-case is called without the parameter.
The previous call comes from line 4514 of GeneralUtility.php:
// Create new instance and call constructor with parameters $instance = static::instantiateClass($finalClassName, func_get_args());
It should have considered that the $argments0 is a given parameter.
Updated by Franz Holzinger over 8 years ago
The hook is started from TYPO3 extension "tslib_fetce":
tslib_fetce/Classes/Hooks/TypoScriptFrontendTceController.php
However it cannot be called at the moment, because the TYPO3 version has been checked:
class TypoScriptFrontendTceController extends \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController { .... // Hook for processing data submission to extensions: if ( version_compare(TYPO3_version, '7.0.0', '<') && is_array($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission']) ) { foreach ($this->TYPO3_CONF_VARS['SC_OPTIONS']['tslib/class.tslib_fe.php']['checkDataSubmission'] as $_classRef) { $_procObj = GeneralUtility::getUserObj($_classRef); $_procObj->checkDataSubmission($this); } }
Updated by Markus Klein over 8 years ago
- Status changed from Needs Feedback to Closed
Well, it looks like this extension is XCLASSing
class TypoScriptFrontendTceController extends \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
So whatever this thingy does, it obviously is incompatible.
This is for sure not a Core bug.