diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2011-05-05 21:53:10 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2011-05-05 21:53:11 -0700 |
commit | d5a31ceedee5841531f57342266746bb62d7d923 (patch) | |
tree | 5abe8e9811bddaec23d1d15507e0a2a2a11d1da5 /installer | |
parent | 011eaa6480cbee8d328a31c9ac5c8e0ddc1f8a84 (diff) |
Fix for ticket 1275. Do the same checking as Kohana uses and don't worry about calling the utf8_encode routine.
Corrected the error messages and also added a check to insure the XML Parser extension is loaded as we still need the utf8_encode function from it.
Diffstat (limited to 'installer')
-rw-r--r-- | installer/installer.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/installer/installer.php b/installer/installer.php index c23d918f..0bef57ae 100644 --- a/installer/installer.php +++ b/installer/installer.php @@ -191,8 +191,10 @@ class installer { $errors[] = "Gallery 3 requires a MySQL database, but PHP doesn't have either the <a href=\"http://php.net/mysql\">MySQL</a> or the <a href=\"http://php.net/mysqli\">MySQLi</a> extension."; } - if (!@preg_match("/^.$/u", utf8_encode("\xF1"))) { - $errors[] = "PHP is missing <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expression</a> support."; + if (!preg_match("/^.$/u", "ñ")) { + $errors[] = "PHP is missing <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expression</a> with UTF-8 support."; + } else if (!preg_match("/^\pL$/u", "ñ")) { + $errors[] = "PHP is missing <a href=\"http://php.net/pcre\">Perl-Compatible Regular Expression</a> with Unicode support."; } if (!(function_exists("spl_autoload_register"))) { @@ -211,6 +213,10 @@ class installer { $errors[] = "PHP is missing the <a href=\"http://php.net/iconv\">iconv extension</a>"; } + if (!(extension_loaded("xml"))) { + $errors[] = "PHP is missing the <a href=\"http://php.net/xml\">XML Parser extension</a>"; + } + if (!(extension_loaded("simplexml"))) { $errors[] = "PHP is missing the <a href=\"http://php.net/simplexml\">SimpleXML extension</a>"; } |