Bug #74533

No errors from GeneralUtility::callUserFunction without explicit request

Added by Mathias Brodala over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Should have
Category:
Miscellaneous
Target version:
Start date:
2016-03-09
Due date:
% Done:

100%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

Currently trying to call a method of a non existing (not autoloadable) class via `GeneralUtility::callUserFunction()` basically swallows the error (calls debug() in fact) unless the $errorMode parameter was explicitly set to 2.

This happens basically nowhere in the core thus errors like these are hard to catch/find without additional effort.

The $errorMode parameter should be dropped and the exception could be thrown based on @$TYPO3_CONF_VARS['SYS']['displayErrors'] instead. Always throwing an exception for these kind of errors would be preferable though.

Associated revisions

Revision 1de38e97 (diff)
Added by Andreas Fernandez over 2 years ago

[!!!][TASK] Always throw exception if a userFunc does not exist

The parameter `$errorMode` is removed from the method
`GeneralUtility::callUserFunction()`. Thus, the checks agains this
variable are removed as well, causing exceptions being always thrown now.

Resolves: #74533
Releases: master
Change-Id: Ibf8b0c9de55b4d8d210dac8fc6c82b14ca7c849d
Reviewed-on: https://review.typo3.org/50996
Tested-by: TYPO3com <>
Reviewed-by: Benni Mack <>
Tested-by: Benni Mack <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Susanne Moog <>
Tested-by: Susanne Moog <>

History

#1 Updated by Michiel Roos over 3 years ago

+1

#2 Updated by Benni Mack about 3 years ago

Hey Mathias,

how about we remove the option completely in v9.0 (!) and mark it as breaking, basically always throwing a RuntimeException?

Also, we could remove the "&" functionality for persistence logic. I will create a separate patch / issue for that.

#3 Updated by Benni Mack about 3 years ago

  • Target version changed from 8 LTS to 9 LTS

#4 Updated by Gerrit Code Review almost 3 years ago

  • Status changed from New 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/50996

#5 Updated by Gerrit Code Review almost 3 years ago

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

#6 Updated by Gerrit Code Review almost 3 years ago

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

#7 Updated by Gerrit Code Review almost 3 years ago

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

#8 Updated by Gerrit Code Review almost 3 years ago

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

#9 Updated by Gerrit Code Review over 2 years ago

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

#10 Updated by Gerrit Code Review over 2 years ago

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

#11 Updated by Gerrit Code Review over 2 years ago

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

#12 Updated by Andreas Fernandez over 2 years ago

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

#13 Updated by Benni Mack about 1 year ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF