Merge "eslintrc: Disallow calling String/Array/Object methods introduced in ES6 or...
[lhc/web/wiklou.git] / includes / Title.php
index 5b0c3bc..038e8b1 100644 (file)
@@ -2447,7 +2447,7 @@ class Title implements LinkTarget {
                # XXX: this might be better using restrictions
 
                if ( $action === 'patrol' ) {
-                       return [];
+                       return $errors;
                }
 
                if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $this->mTextform ) ) {
@@ -4438,7 +4438,7 @@ class Title implements LinkTarget {
         * Get the oldest revision timestamp of this page
         *
         * @param int $flags Title::GAID_FOR_UPDATE
-        * @return string MW timestamp
+        * @return string|null MW timestamp
         */
        public function getEarliestRevTime( $flags = 0 ) {
                $rev = $this->getFirstRevision( $flags );
@@ -4846,8 +4846,9 @@ class Title implements LinkTarget {
 
                $dbw = wfGetDB( DB_MASTER );
                $dbw->onTransactionPreCommitOrIdle(
-                       function () {
-                               ResourceLoaderWikiModule::invalidateModuleCache( $this, null, null, wfWikiID() );
+                       function () use ( $dbw ) {
+                               ResourceLoaderWikiModule::invalidateModuleCache(
+                                       $this, null, null, $dbw->getDomainId() );
                        },
                        __METHOD__
                );