X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=maintenance%2FMaintenance.php;h=04aa3a5e0352ff3ca454fba28384b6fa16c6c87c;hb=d9859b32cddd76ab7c2e9c17bcd951aa2f6b7fd9;hp=c97c6a35f44ef1d24229665948ff3c8422f46636;hpb=5d78cff4c6c4ade7880275511eec7c35c972b8d0;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php index c97c6a35f4..04aa3a5e03 100644 --- a/maintenance/Maintenance.php +++ b/maintenance/Maintenance.php @@ -20,12 +20,10 @@ * @defgroup Maintenance Maintenance */ -// Make sure we're on PHP5.3.3 or better -if ( !function_exists( 'version_compare' ) || version_compare( PHP_VERSION, '5.3.3' ) < 0 ) { - // We need to use dirname( __FILE__ ) here cause __DIR__ is PHP5.3+ - require_once dirname( __FILE__ ) . '/../includes/PHPVersionError.php'; - wfPHPVersionError( 'cli' ); -} +// Bail on old versions of PHP, or if composer has not been run yet to install +// dependencies. Using dirname( __FILE__ ) here because __DIR__ is PHP5.3+. +require_once dirname( __FILE__ ) . '/../includes/PHPVersionCheck.php'; +wfEntryPointCheck( 'cli' ); /** * @defgroup MaintenanceArchive Maintenance archives @@ -959,10 +957,9 @@ abstract class Maintenance { $wgShowSQLErrors = true; - // @codingStandardsIgnoreStart Allow error suppression. wfSuppressWarnings() - // is not available. - @set_time_limit( 0 ); - // @codingStandardsIgnoreStart + MediaWiki\suppressWarnings(); + set_time_limit( 0 ); + MediaWiki\restoreWarnings(); $this->adjustMemoryLimit(); }