Treat phpdbg as run from the command line when checking PHP_SAPI
[lhc/web/wiklou.git] / includes / debug / logger / monolog / WikiProcessor.php
index e39a2c3..db5b9bf 100644 (file)
@@ -39,7 +39,7 @@ class WikiProcessor {
                $record['extra']['wiki'] = wfWikiID();
                $record['extra']['mwversion'] = $wgVersion;
                $record['extra']['reqId'] = \WebRequest::getRequestId();
-               if ( PHP_SAPI === 'cli' && isset( $_SERVER['argv'] ) ) {
+               if ( wfIsCLI() && isset( $_SERVER['argv'] ) ) {
                        $record['extra']['cli_argv'] = implode( ' ', $_SERVER['argv'] );
                }
                return $record;