Treat phpdbg as run from the command line when checking PHP_SAPI
[lhc/web/wiklou.git] / includes / profiler / Profiler.php
index 4da7976..81449be 100644 (file)
@@ -74,7 +74,8 @@ abstract class Profiler {
                        }
 
                        $inSample = mt_rand( 0, $params['sampling'] - 1 ) === 0;
-                       if ( PHP_SAPI === 'cli' || !$inSample ) {
+                       // wfIsCLI() is not available yet
+                       if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' || !$inSample ) {
                                $params['class'] = 'ProfilerStub';
                        }