Use PHP 7 "\u{NNNN}" Unicode codepoint escapes in string literals
[lhc/web/wiklou.git] / includes / installer / Installer.php
index 1efe5d6..00bd4d0 100644 (file)
@@ -811,7 +811,7 @@ abstract class Installer {
                // with utf8 support, but not unicode property support.
                // check that \p{Zs} (space separators) matches
                // U+3000 (Ideographic space)
-               $regexprop = preg_replace( '/\p{Zs}/u', '', "-\xE3\x80\x80-" );
+               $regexprop = preg_replace( '/\p{Zs}/u', '', "-\u{3000}-" );
                Wikimedia\restoreWarnings();
                if ( $regexd != '--' || $regexprop != '--' ) {
                        $this->showError( 'config-pcre-no-utf8' );
@@ -990,6 +990,10 @@ abstract class Installer {
                        return true;
                }
 
+               if ( Shell::isDisabled() ) {
+                       return true;
+               }
+
                # Get a list of available locales.
                $result = Shell::command( '/usr/bin/locale', '-a' )
                        ->execute();
@@ -1133,7 +1137,7 @@ abstract class Installer {
                /**
                 * This needs to be updated something that the latest libicu
                 * will properly normalize.  This normalization was found at
-                * http://www.unicode.org/versions/Unicode5.2.0/#Character_Additions
+                * https://www.unicode.org/versions/Unicode5.2.0/#Character_Additions
                 * Note that we use the hex representation to create the code
                 * points in order to avoid any Unicode-destroying during transit.
                 */
@@ -1199,7 +1203,7 @@ abstract class Installer {
                $scriptTypes = [
                        'php' => [
                                "<?php echo 'ex' . 'ec';",
-                               "#!/var/env php5\n<?php echo 'ex' . 'ec';",
+                               "#!/var/env php\n<?php echo 'ex' . 'ec';",
                        ],
                ];