RedirectSpecialArticle: Fix PHP notice about undefined index
authorBartosz Dziewoński <matma.rex@gmail.com>
Mon, 19 Aug 2019 16:55:22 +0000 (18:55 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Mon, 19 Aug 2019 16:56:56 +0000 (16:56 +0000)
Follow-up to 68558351c835c577fb8eb504aa96822a1dff1e7b.

Change-Id: I611509c7a27a6b49d322dd43832dc33fdc7db790

includes/specialpage/RedirectSpecialArticle.php

index 27cd2ab..0a1ce61 100644 (file)
@@ -116,7 +116,7 @@ abstract class RedirectSpecialArticle extends RedirectSpecialPage {
                // Avoid double redirect for action=edit&redlink=1 for existing pages
                // (compare to the check in EditPage::edit)
                if (
-                       $query &&
+                       $query && isset( $query['action'] ) && isset( $query['redlink'] ) &&
                        ( $query['action'] === 'edit' || $query['action'] === 'submit' ) &&
                        (bool)$query['redlink'] &&
                        $title instanceof Title &&