--- typo3_src-4.3.2/t3lib/class.t3lib_extmgm.php 2010-02-23 12:00:04.000000000 +0100 +++ patch/t3lib/class.t3lib_extmgm.php 2010-03-13 09:43:47.000000000 +0100 @@ -136,6 +136,21 @@ } /** + * Displays the last function calls before the error has occurred. + */ + public static function echoBacktrace () { + $backtrace = debug_backtrace(); + echo 'Backtrace:
'; + for ($i = 11; $i >= 0; --$i) { + if (is_array($backtrace[$i])) { + $file = file($backtrace[$i]['file']); + $out = htmlspecialchars($backtrace[$i]['file'].' : '.$backtrace[$i]['line']).'
'; + echo $out; + } + } + } + + /** * Returns the absolute path to the extension with extension key $key * If the extension is not loaded the function will die with an error message * Useful for internal fileoperations @@ -146,10 +161,11 @@ * @return string */ public static function extPath($key, $script = '') { - global $TYPO3_LOADED_EXT; + global $TYPO3_LOADED_EXT, $_EXTKEY; if (!isset($TYPO3_LOADED_EXT[$key])) { #debug(array(debug_backtrace())); - die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extPath)'); + self::echoBacktrace(); + die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded for extension "' . $_EXTKEY .'"! (t3lib_extMgm::extPath)'); } return PATH_site.$TYPO3_LOADED_EXT[$key]['siteRelPath'].$script; } @@ -164,9 +180,10 @@ * @return string */ public static function extRelPath($key) { - global $TYPO3_LOADED_EXT; + global $TYPO3_LOADED_EXT, $_EXTKEY; if (!isset($TYPO3_LOADED_EXT[$key])) { - die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extRelPath)'); + self::echoBacktrace(); + die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded for extension "' . $_EXTKEY .'"! (t3lib_extMgm::extRelPath)'); } return $TYPO3_LOADED_EXT[$key]['typo3RelPath']; }