Event Timeline
Comment Actions
diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index adca80ded5..f3d0ede787 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -48,6 +48,13 @@ class AutoLoader { $wgAutoloadAttemptLowercase; $filename = false; + $trace = debug_backtrace(); + //var_dump($trace); + $func = $trace[2]['function'] ?? ''; + if ( $func === 'require' || $func === 'require_once') { + $func = 'requiring ' . ( $trace[3]['args'][0] ?? 'unknown' ); + } + file_put_contents( 'debug.log', ( $trace[2]['class'] ?? '' ) . '::' . $func . " triggered $className\n", FILE_APPEND ); if ( isset( $wgAutoloadLocalClasses[$className] ) ) { $filename = $wgAutoloadLocalClasses[$className];