Merge "resourceloader: Use "\n" instead of ";" as separator for scripts"
[lhc/web/wiklou.git] / includes / MediaWiki.php
index a7214c7..364ed86 100644 (file)
@@ -898,12 +898,12 @@ class MediaWiki {
                        __METHOD__
                );
 
+               // Important: this must be the last deferred update added (T100085, T154425)
+               DeferredUpdates::addCallableUpdate( [ JobQueueGroup::class, 'pushLazyJobs' ] );
+
                // Do any deferred jobs
                DeferredUpdates::doUpdates( 'enqueue' );
 
-               // Make sure any lazy jobs are pushed
-               JobQueueGroup::pushLazyJobs();
-
                // Now that everything specific to this request is done,
                // try to occasionally run jobs (if enabled) from the queues
                if ( $mode === 'normal' ) {