Permalink
Browse files

BUGFIX Checking for mbstring PHP extension support in installer, as i…

…t has been a documented installation requirement for a while. Removing method_exists() checks from mbstring usage in core for the same reasons
  • Loading branch information...
1 parent 6f9483c commit 1671b9c65c483508c717cf356691de41a64b4e7b @chillu chillu committed May 9, 2012
Showing with 8 additions and 7 deletions.
  1. +3 −5 core/Core.php
  2. +4 −1 dev/install/install.php5
  3. +1 −1 model/URLSegmentFilter.php
View
@@ -203,11 +203,9 @@
/**
* Set default encoding
*/
-if(function_exists('mb_http_output')) {
- mb_http_output('UTF-8');
- mb_internal_encoding('UTF-8');
- mb_regex_encoding('UTF-8');
-}
+mb_http_output('UTF-8');
+mb_internal_encoding('UTF-8');
+mb_regex_encoding('UTF-8');
///////////////////////////////////////////////////////////////////////////////
// INCLUDES
View
@@ -431,8 +431,11 @@ class InstallRequirements {
// Check for iconv support
$this->requireFunction('iconv', array('PHP Configuration', 'iconv support', 'iconv support not included in PHP.'));
+ // Check for mbstring support
+ $this->requireFunction('iconv', array('PHP Configuration', 'iconv support', 'iconv support not included in PHP.'));
+
// Check for hash support
- $this->requireFunction('hash', array('PHP Configuration', 'hash support', 'hash support not included in PHP.'));
+ $this->requireFunction('mb_internal_encoding', array('PHP Configuration', 'mbstring support', 'mbstring support not included in PHP.'));
// Check for Reflection support
$this->requireClass('ReflectionClass', array('PHP Configuration', 'Reflection support', 'Reflection support not included in PHP.'));
@@ -62,7 +62,7 @@ function filter($name) {
if($transliterator) $name = $transliterator->toASCII($name);
}
- $name = (function_exists('mb_strtolower')) ? mb_strtolower($name) : strtolower($name);
+ $name = mb_strtolower($name);
$replacements = $this->getReplacements();
if($this->getAllowMultibyte()) {
// unset automated removal of non-ASCII characters, and don't try to transliterate

0 comments on commit 1671b9c

Please sign in to comment.