Check for intl extension in updateCredits.php
authorUmherirrender <umherirrender_de.wp@web.de>
Fri, 1 Feb 2019 18:57:56 +0000 (19:57 +0100)
committerUmherirrender <umherirrender_de.wp@web.de>
Fri, 1 Feb 2019 18:57:56 +0000 (19:57 +0100)
Change-Id: Ifa2892b2f38fa73362c3ac60e1d90614cdbc0a93

maintenance/updateCredits.php

index b7e8c1c..25ce3ce 100644 (file)
@@ -26,6 +26,12 @@ if ( PHP_SAPI != 'cli' ) {
        die( "This script can only be run from the command line.\n" );
 }
 
+// class Collator is provided by the intl extension.
+// It is only suggested in composer.json, so remind here when not loaded.
+if ( !extension_loaded( 'intl' ) ) {
+       die( "This script needs the 'intl' extension to be loaded." );
+}
+
 $CREDITS = 'CREDITS';
 $START_CONTRIBUTORS = '<!-- BEGIN CONTRIBUTOR LIST -->';
 $END_CONTRIBUTORS = '<!-- END CONTRIBUTOR LIST -->';