Treat phpdbg as run from the command line when checking PHP_SAPI
[lhc/web/wiklou.git] / includes / utils / UIDGenerator.php
index 736109b..68ef57a 100644 (file)
@@ -367,7 +367,7 @@ class UIDGenerator {
                // Use APC/eAccelerator/xcache if requested, available, and not in CLI mode;
                // Counter values would not survive accross script instances in CLI mode.
                $cache = null;
-               if ( ( $flags & self::QUICK_VOLATILE ) && PHP_SAPI !== 'cli' ) {
+               if ( ( $flags & self::QUICK_VOLATILE ) && !wfIsCLI() ) {
                        $cache = MediaWikiServices::getInstance()->getLocalServerObjectCache();
                }
                if ( $cache ) {