From 3e67b571d40b27ddcbc94105172fef53f8f6a874 Mon Sep 17 00:00:00 2001
From: Kosta Harlan <kharlan@wikimedia.org>
Date: Wed, 3 Oct 2018 12:47:14 -0400
Subject: [PATCH] Permissions: Return existing errors instead of empty array

Bug: T206130
Change-Id: I2df0551c5837adc578b27082ab6ba2ac95d937f8
---
 includes/Title.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/includes/Title.php b/includes/Title.php
index 5b0c3bc2dd..de551b4d23 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -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 ) ) {
-- 
2.19.0

