Bug #70015
closedException/CMS/1 during update to 6.2.15
0%
Description
Error:¶
While upgrading to 6.2.15 I have got the following error in the Install-tool when trying to use the Upgrade Wizard:
Uncaught TYPO3 Exception #1: PHP Catchable Fatal Error: Argument 2 passed to TYPO3\CMS\Core\Utility\GeneralUtility::array_merge() must be of the type array, null given, called in /var/www/vhosts/<dom.tld>/sub_test/typo3conf/ext/t3skin_improved/ext_tables.php on line 44 and defined in /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 1795 (More information) TYPO3\CMS\Core\Error\Exception thrown in file /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 101.
(/Full details below)
Cause:¶
If I track it correctly this is raised by the arry_merge function in sysext/core/Classes/Utility/GeneralUtility.php (line 1795) which does not check if any part of the two arrays to merge is null.
Ans this seems to be the case when the function is called from the t2skin_improved, which (possibly) does it due to repetitive/recursive use of the statement in typo3conf/ext/t3skin_improved/ext_tables.php at line 39.
// some special icons for container sysfolders $path_icons_original = '../' . TYPO3_mainDir . 'gfx/i/'; $ICON_TYPES = t3lib_div::array_merge(array( 'fe_users' => Array('icon' => $path_icons_original . 'modules_fe_users.gif'), 'shop' => Array('icon' => $path_icons_original . 'modules_shop.gif'), 'board' => Array('icon' => $path_icons_original . 'modules_board.gif'), 'approve' => Array('icon' => $path_icons_original . 'modules_approvals.gif'), ), $ICON_TYPES); if (t3lib_extMgm::isLoaded('direct_mail')) { $ICON_TYPES = t3lib_div::array_merge(array( 'dmail' => Array('icon' => t3lib_extMgm::extRelPath('direct_mail') . 'res/gfx/modules_dmail.gif'), ), $ICON_TYPES); }
Additional Info:¶
Uncaught TYPO3 Exception #1: PHP Catchable Fatal Error: Argument 2 passed to TYPO3\CMS\Core\Utility\GeneralUtility::array_merge() must be of the type array, null given, called in /var/www/vhosts/<dom.tld>/sub_test/typo3conf/ext/t3skin_improved/ext_tables.php on line 44 and defined in /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/core/Classes/Utility/GeneralUtility.php line 1795 (More information) TYPO3\CMS\Core\Error\Exception thrown in file /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/core/Classes/Error/ErrorHandler.php in line 101. 11 TYPO3\CMS\Core\Error\ErrorHandler::handleError(4096, "Argument 2 passed to TYPO3\CMS\Core\Utility\Genera…kin_improved/ext_tables.php on line 44 and defined", "/var/www/vhosts/<dom.tld>/sub_test/typo…po3/sysext/core/Classes/Utility/GeneralUtility.php", 1795, array) /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/core/Classes/Utility/GeneralUtility.php: 01793: * @return array Merged result. 01794: */ 01795: static public function array_merge(array $arr1, array $arr2) { 01796: return $arr2 + $arr1; 01797: } 10 TYPO3\CMS\Core\Utility\GeneralUtility::array_merge(array, NULL) /var/www/vhosts/<dom.tld>/sub_test/typo3conf/ext/t3skin_improved/ext_tables.php: 00042: 'board' => Array('icon' => $path_icons_original . 'modules_board.gif'), 00043: 'approve' => Array('icon' => $path_icons_original . 'modules_approvals.gif'), 00044: ), $ICON_TYPES); 00045: 00046: if (t3lib_extMgm::isLoaded('direct_mail')) { 9 require("/var/www/vhosts/<dom.tld>/sub_test/typo3conf/ext/t3skin_improved/ext_tables.php") /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php: 01785: // and are explicitly set in cached file as well 01786: $_EXTCONF = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf'][$_EXTKEY]; 01787: require $extensionInformation['ext_tables.php']; 01788: static::loadNewTcaColumnsConfigFiles(); 01789: } 8 TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadSingleExtTablesFiles() /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php: 01763: } 01764: } else { 01765: self::loadSingleExtTablesFiles(); 01766: } 01767: } 7 TYPO3\CMS\Core\Utility\ExtensionManagementUtility::loadExtTables(boolean) /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/core/Classes/Core/Bootstrap.php: 00942: public function loadExtensionTables($allowCaching = TRUE) { 00943: Utility\ExtensionManagementUtility::loadBaseTca($allowCaching); 00944: Utility\ExtensionManagementUtility::loadExtTables($allowCaching); 00945: $this->executeExtTablesAdditionalFile(); 00946: $this->runExtTablesPostProcessingHooks(); 6 TYPO3\CMS\Core\Core\Bootstrap::loadExtensionTables(boolean) /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/install/Classes/Controller/Action/AbstractAction.php: 00250: ->applyAdditionalConfigurationSettings() 00251: ->initializeTypo3DbGlobal() 00252: ->loadExtensionTables(FALSE); 00253: } 00254: 5 TYPO3\CMS\Install\Controller\Action\AbstractAction::loadExtLocalconfDatabaseAndExtTables() /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/install/Classes/Controller/Action/Tool/UpgradeWizard.php: 00037: protected function executeAction() { 00038: // ext_localconf, db and ext_tables must be loaded for the upgrade wizards 00039: $this->loadExtLocalconfDatabaseAndExtTables(); 00040: 00041: // To make sure initialUpdateDatabaseSchema is first wizard, it is added here instead of ext_localconf.php 4 TYPO3\CMS\Install\Controller\Action\Tool\UpgradeWizard::executeAction() /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/install/Classes/Controller/Action/AbstractAction.php: 00087: public function handle() { 00088: $this->initializeHandle(); 00089: return $this->executeAction(); 00090: } 00091: 3 TYPO3\CMS\Install\Controller\Action\AbstractAction::handle() /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/install/Classes/Controller/ToolController.php: 00185: $toolAction->setPostValues($this->getPostValues()); 00186: $toolAction->setLastError($this->getLastError()); 00187: $this->output($toolAction->handle()); 00188: } 00189: } 2 TYPO3\CMS\Install\Controller\ToolController::dispatchAuthenticationActions() /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/install/Classes/Controller/ToolController.php: 00061: $this->outputLoginFormIfNotAuthorized(); 00062: $this->registerExtensionConfigurationErrorHandler(); 00063: $this->dispatchAuthenticationActions(); 00064: } 00065: 1 TYPO3\CMS\Install\Controller\ToolController::execute() /var/www/vhosts/<dom.tld>/sub_test/typo3_src-6.2.15/typo3/sysext/install/Start/Install.php: 00117: } 00118: } 00119: \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance($controllerClassName)->execute();
Updated by Mathias Schreiber about 9 years ago
- Status changed from New to Needs Feedback
- Assignee set to Mathias Schreiber
isn't the problem that someone tries to merge an array with null?
Updated by Kurt Ludikovsky about 9 years ago
Partially:
As described, the null array is the cause for the error.
But the caling routine is basically a "i += 1" situation.
So, add somthing to an array. In the first step the array might not be initialized.
And this should - in my opnion - be done in the called function.
What else should be the purpose for a function be which is
called as
t3lib_div::array_merge(arr1, arr2)
and does actually this
arr1 + arr2
==>
static public function array_merge(array $arr1, array $arr2) { return $arr2 + $arr1; }
So the purpose is to check if the operation can be done and do it properly.
Updated by Benni Mack about 9 years ago
- Target version changed from 6.2.15 to next-patchlevel
Updated by Mathias Schreiber about 9 years ago
- Target version deleted (
next-patchlevel)
Updated by Kurt Ludikovsky about 9 years ago
Hay guys, I am not completely aware how you are handling the issues here.
But when two guys are re-setting the status, I get somewhat the impression there is some tension in air.
The statuts is also on "Needs feedback".
From whom on what, where ist the question?
Writing this takes more time than solving the issue.
Updated by Mathias Schreiber about 9 years ago
Hi Kurt,
no, we're cool.
We decided to work a bit differently with target version, thus I reset the target version next-patchlevel on all tickets via batch processing.
We need to work with then manpower we have and having 200+ tickets for the next patchlevel resulted in the swarm-problem... the devs don't know which task to pick.
Updated by Georg Ringer about 9 years ago
- Status changed from Needs Feedback to Closed
Hi,
we deprecated the method array_merge in GeneralUtility with #64596 in favor of the native PHP functions
@deprecated since TYPO3 CMS 7, will be removed in TYPO3 CMS 8 - native php '+' operator instead
therefore nothing will be changed in this method anymore and I am closing this issue.