Bug #80897

CLI typo3/sysext/core/bin/typo3 throws PHP Warning

Added by R3 H6 over 3 years ago. Updated about 2 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
CLI
Target version:
-
Start date:
2017-04-19
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

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


Related issues

Related to TYPO3 Core - Bug #81795: New CLI API is broken with empty cacheClosed2017-07-05

Actions
#1

Updated by Benni Mack over 3 years ago

  • Status changed from New to Needs Feedback

Do you provide any arguments / specific command in the Command Line?

#2

Updated by R3 H6 over 3 years ago

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...

#3

Updated by Riccardo De Contardi over 3 years ago

  • 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 :) )

#4

Updated by ondro no-lastname-given over 3 years ago

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

#5

Updated by Thomas Maroschik over 3 years ago

  • 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.

#6

Updated by Gerrit Code Review over 3 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53270

#7

Updated by Gerrit Code Review over 3 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53279

#8

Updated by Gerrit Code Review over 3 years ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/53279

#9

Updated by Benni Mack over 3 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#10

Updated by Christian Kuhn over 3 years ago

  • Related to Bug #81795: New CLI API is broken with empty cache added
#11

Updated by Benni Mack about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF