Project

General

Profile

Bug #27348 » debug-backtrace.patch

Schmidt Timo, 2011-06-10 12:59

View differences:

t3lib/class.t3lib_tcemain.php
*/
protected function getOuterMostInstance() {
if (!isset($this->outerMostInstance)) {
$stack = array_reverse(debug_backtrace(TRUE));
foreach ($stack as $stackItem) {
if (isset($stackItem['object']) && $stackItem['object'] instanceof t3lib_TCEmain) {
$this->outerMostInstance = $stackItem['object'];
break;
$backtrace = debug_backtrace();
if(is_array($backtrace)) {
$stack = array_reverse($backtrace);
if(is_array($stack)) {
foreach ($stack as $stackItem) {
if (isset($stackItem['object']) && $stackItem['object'] instanceof t3lib_TCEmain) {
$this->outerMostInstance = $stackItem['object'];
break;
}
}
}
}
}
(1-1/2)