summaryrefslogtreecommitdiff
path: root/includes/installer/Installer.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-11-30 05:40:20 +0100
committerPierre Schmitz <pierre@archlinux.de>2012-11-30 05:40:20 +0100
commit8a1f9ada65d746b630c96b184000f3f0bf6cf34d (patch)
treef641d0e874d1ac6a04c30e2e8a112fb1c4ceb6bd /includes/installer/Installer.php
parent9498a3d2852ace0f4ee23598f542dbce3fd2ec28 (diff)
Update to MediaWiki 1.19.3
Diffstat (limited to 'includes/installer/Installer.php')
-rw-r--r--includes/installer/Installer.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/includes/installer/Installer.php b/includes/installer/Installer.php
index 43683e82..990d4449 100644
--- a/includes/installer/Installer.php
+++ b/includes/installer/Installer.php
@@ -756,6 +756,11 @@ abstract class Installer {
/**
* Environment check for the PCRE module.
+ *
+ * @note If this check were to fail, the parser would
+ * probably throw an exception before the result
+ * of this check is shown to the user.
+ * @return bool
*/
protected function envCheckPCRE() {
if ( !function_exists( 'preg_match' ) ) {
@@ -764,8 +769,13 @@ abstract class Installer {
}
wfSuppressWarnings();
$regexd = preg_replace( '/[\x{0430}-\x{04FF}]/iu', '', '-АБВГД-' );
+ // Need to check for \p support too, as PCRE can be compiled
+ // 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-" );
wfRestoreWarnings();
- if ( $regexd != '--' ) {
+ if ( $regexd != '--' || $regexprop != '--' ) {
$this->showError( 'config-pcre-no-utf8' );
return false;
}