From 71713f6f2356a90a4672c609d90bc6ad030f86c2 Mon Sep 17 00:00:00 2001 From: paladox Date: Wed, 27 Dec 2023 23:59:32 +0000 Subject: [PATCH] Update Target.php --- includes/Target.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/Target.php b/includes/Target.php index a76fcc3..e203959 100644 --- a/includes/Target.php +++ b/includes/Target.php @@ -240,7 +240,11 @@ class Target { */ public function redirectsTo( $source ) { if ( $this->getContent() ) { - $redirectTitle = $this->getContent()->getUltimateRedirectTarget(); + if ( version_compare( MW_VERSION, '1.38', '>=' ) ) { + $redirectTitle = $this->getContent()->getRedirectTarget(); + } else { + $redirectTitle = $this->getContent()->getUltimateRedirectTarget(); + } return $redirectTitle && $redirectTitle->equals( $source->getTitle() ); } }