Bug #80897
closed
CLI typo3/sysext/core/bin/typo3 throws PHP Warning
Added by R3 H6 almost 7 years ago.
Updated over 5 years ago.
Description
With preset "debug" activated in Install-Tool,
calling the cli typo3/sysext/core/bin/typo3 throws:
Uncaught TYPO3 Exception #1476107295: PHP Warning: Invalid argument supplied for foreach() in /var/www/vendor/typo3/cms/typo3/sysext/core/Classes/Utility/RootlineUtility.php line 287
thrown in file /var/www/vendor/typo3/cms/typo3/sysext/core/Classes/Error/ErrorHandler.php
in line 112
- Status changed from New to Needs Feedback
Do you provide any arguments / specific command in the Command Line?
After some while I realized, it has nothing to do with the debug settings.
The error occurs on an TYPO3 installation with a custom extension which has some symfony based commands.
If I deinstall and install the extension again, the error disappears for a while, but comes back after a while.
So I guess it something related to caching.
In the configure method only setDescription, addArgument and addOption are used, not object initialization or so.
Issue can be closed, if nobody experience same problem with custom commands...
- Status changed from Needs Feedback to Closed
Thank you for your feedback; I'll close this issue for now. If someone experiences the same issue and wants to add more detail , then please reopen the issue (or contact me and I will do :) )
R3 H6 wrote:
With preset "debug" activated in Install-Tool,
calling the cli typo3/sysext/core/bin/typo3 throws:
Uncaught TYPO3 Exception #1476107295: PHP Warning: Invalid argument supplied for foreach() in /var/www/vendor/typo3/cms/typo3/sysext/core/Classes/Utility/RootlineUtility.php line 287
thrown in file /var/www/vendor/typo3/cms/typo3/sysext/core/Classes/Error/ErrorHandler.php
in line 112
Can confirm, same behaviour for typo3 v8.7.1
When I set debug = false, console works with no problems
Setting back debug to true console works until I clear caches
- Status changed from Closed to Needs Feedback
Ok, here's how to reproduce the issue in 8.7.1:
- Clear cache via install tool
- One shouldn't be logged in in the BE, because background AJAX requests populate TCA cache
- Call on the commandline
vendor/bin/typo3 help
- See the warning the issue author already described
The change https://review.typo3.org/#/c/52753/ fixes that problem. But it isn't solved in 8.7.
I would suggest to backport the behavior from master, or move TCA loading from the handleRequest
method in the \TYPO3\CMS\Core\Console\CommandRequestHandler
to it's __construct
method. This way CLI works under every condition and eID is left untouched.
- Status changed from Needs Feedback to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
- Related to Bug #81795: New CLI API is broken with empty cache added
- Status changed from Resolved to Closed
Also available in: Atom
PDF