steffenmaechtel / exception_handling_for_typo3_db
TYPO3 CMS extension: Throw exception in case of error instead of show error with DebugUtility::debug
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
Requires
- php: >=7.0.0,<7.3.0
- typo3/cms-core: >=8.7.0,<8.7.999
Conflicts
This package is auto-updated.
Last update: 2024-09-29 05:28:02 UTC
README
Throw exception in case of error instead of show error with DebugUtility::debug
Current handling in TYPO3 8.x with the old $GLOBALS['TYPO3_DB']
Execution of a wrong sql query only shows a debug message and dont throw an exception
$GLOBALS['TYPO3_DB']->sql_query('SELECT not_existing_field FROM pages');
In case of using a redirect after this query ($this->redirect()) the error is not shown at all
What does this extension do
Overload the class behind $GLOBALS['TYPO3_DB'] and throw exception in case of sql error
Notice
Avoid using $GLOBALS['TYPO3_DB']. Its deprecated since TYPO3 8.5.
Use the new \TYPO3\CMS\Core\Database\ConnectionPool.
This extension might help in case you cant rewrite old stuff using $GLOBALS['TYPO3_DB'].