Merge "Hard deprecate MWNamespace::canTalk()"
[lhc/web/wiklou.git] / includes / jobqueue / JobQueueDB.php
index 9931d83..65c27d8 100644 (file)
@@ -56,7 +56,7 @@ class JobQueueDB extends JobQueue {
                parent::__construct( $params );
 
                $this->cluster = $params['cluster'] ?? false;
-               $this->cache = ObjectCache::getMainWANInstance();
+               $this->cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
        }
 
        protected function supportedOrders() {
@@ -206,6 +206,7 @@ class JobQueueDB extends JobQueue {
        /**
         * This function should *not* be called outside of JobQueueDB
         *
+        * @suppress SecurityCheck-SQLInjection Bug in phan-taint-check handling bulk inserts
         * @param IDatabase $dbw
         * @param IJobSpecification[] $jobs
         * @param int $flags
@@ -214,7 +215,7 @@ class JobQueueDB extends JobQueue {
         * @return void
         */
        public function doBatchPushInternal( IDatabase $dbw, array $jobs, $flags, $method ) {
-               if ( !count( $jobs ) ) {
+               if ( $jobs === [] ) {
                        return;
                }