aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/Maintenance.php
diff options
context:
space:
mode:
authorArtBaltai <art.baltai@speedandfunction.com>2020-04-11 17:14:09 +0300
committerReedy <reedy@wikimedia.org>2020-04-14 01:54:05 +0000
commit9ff7146049f6ee80ab2340e5a4a11afdce7918fd (patch)
tree51a881f5c3ae70eeb77a0ec0414a7f8a866bd2d2 /maintenance/Maintenance.php
parentf4a9324e5a1b693cc2f2c94abe58a04cba142786 (diff)
downloadmediawikicore-9ff7146049f6ee80ab2340e5a4a11afdce7918fd.tar.gz
mediawikicore-9ff7146049f6ee80ab2340e5a4a11afdce7918fd.zip
Maintenance: Don't redefine MW_ENTRY_POINT if it's already set
Maintenance.php may be included after other entry points in certain configurations (like IDE bootstrapping). So if MW_ENTRY_POINT is already set, don't try and define() it as another value. Bug: T250003 Change-Id: Ide011ad11d8dd29fe786a745c6e67259e46b9bfb
Diffstat (limited to 'maintenance/Maintenance.php')
-rw-r--r--maintenance/Maintenance.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index ce03f9b30222..ad438fdc8c8f 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -21,8 +21,9 @@
*/
// phpcs:disable MediaWiki.Classes.UnsortedUseStatements.UnsortedUse
-
-define( 'MW_ENTRY_POINT', 'cli' );
+if ( !defined( 'MW_ENTRY_POINT' ) ) {
+ define( 'MW_ENTRY_POINT', 'cli' );
+}
// Bail on old versions of PHP, or if composer has not been run yet to install
// dependencies.