Merge "Fix sessionfailure i18n message during authentication"
[lhc/web/wiklou.git] / includes / utils / UIDGenerator.php
index 736109b..164615a 100644 (file)
@@ -364,10 +364,10 @@ class UIDGenerator {
 
                $counter = null; // post-increment persistent counter value
 
-               // Use APC/eAccelerator/xcache if requested, available, and not in CLI mode;
+               // Use APC/etc 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 ) {