Actions
Bug #67221
closedDataHandler class generates a name collision
Status:
Closed
Priority:
Must have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-06-01
Due date:
% Done:
0%
Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:
Description
Under some circumstances class loading fails with the following error:
PHP Fatal error: Cannot use TYPO3\CMS\Backend\Utility\BackendUtility as BackendUtility because the name is already in use in /var/www/t3_plansee/htdocs/typo3conf/ext/news/Classes/Hooks/DataHandler.php on line 18
This is because of line 18 in the DataHandler.php: use TYPO3\CMS\Backend\Utility\BackendUtility
After removing line 18 and replacing the BackendUtility class with the full qualified name it works.
One way to produce this error is to call l10nmgr import cli with php-cgi:"php-cgi" -q -e -d register_argc_argv=1 "cli_dispatch.phpsh" l10nmgr_import --task importFile --preview 1 --file trans.xml --server "http://URL/"
The error occures in the TYPO3\CMS\Core\Core\ClassLoader->loadClass() method in line 197 (typo3 6.2.12:
|| (bool)require_once $classLoadingInformation[0];): if (!empty($classLoadingInformation)) { // The call to class_exists/interface_exists fixes a rare case when early instances need to be aliased // but PHP fails to recognize the real path of the class. See #55904 $loadingSuccessful = class_exists($classLoadingInformation[1], FALSE) || interface_exists($classLoadingInformation[1], FALSE) || (bool)require_once $classLoadingInformation[0]; }
I think it has something to do with the extensions BackendUtility class.
Files
Actions