[!!!][TASK] Remove ExtJS Debugging and $GLOBALS['error']
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Resources / PHP / GlobalDebugFunctions.php
1 <?php
2 // Simple debug function which prints output immediately
3 function xdebug($var = '', $debugTitle = 'xdebug')
4 {
5 // If you wish to use the debug()-function, and it does not output something,
6 // please edit the IP mask in TYPO3_CONF_VARS
7 if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
8 return;
9 }
10 \TYPO3\CMS\Core\Utility\DebugUtility::debug($var, $debugTitle);
11 }
12
13 // Debug function
14 function debug($variable = '', $name = '*variable*', $line = '*line*', $file = '*file*', $recursiveDepth = 3, $debugLevel = E_DEBUG)
15 {
16 // If you wish to use the debug()-function, and it does not output something,
17 // please edit the IP mask in TYPO3_CONF_VARS
18 if (!\TYPO3\CMS\Core\Utility\GeneralUtility::cmpIP(\TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('REMOTE_ADDR'), $GLOBALS['TYPO3_CONF_VARS']['SYS']['devIPmask'])) {
19 return;
20 }
21 $title = $name === '*variable*' ? '' : $name;
22 $group = $line === '*line*' ? null : $line;
23 \TYPO3\CMS\Core\Utility\DebugUtility::debug($variable, $title, $group);
24 }