aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Grekas <nicolas.grekas@gmail.com>2013-08-29 12:40:45 +0200
committerNicolas Grekas <nicolas.grekas@gmail.com>2013-08-29 12:40:45 +0200
commit0d0a40841b5ab1c3bb74f6b0b9bfff94c4dcfab6 (patch)
tree555e6648130c411278b0f4fe0a452d7c45b89997
parent07ba3e09c1b520316acfe726ffed464553d7aaad (diff)
downloadUstring-0d0a40841b5ab1c3bb74f6b0b9bfff94c4dcfab6.zip
Ustring-0d0a40841b5ab1c3bb74f6b0b9bfff94c4dcfab6.tar.gz
Ustring-0d0a40841b5ab1c3bb74f6b0b9bfff94c4dcfab6.tar.bz2
Remove strong dependency check for mbstring
The mbstring functions that are used here can be implemented directly in PHP, (see https://github.com/nicolas-grekas/Patchwork-UTF8/blob/master/class/Patchwork/PHP/Shim/Mbstring.php ) but checking for the extension directly excludes this kind of compatibility implementations from working.
-rw-r--r--String.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/String.php b/String.php
index b5cf37a..bbe3a37 100644
--- a/String.php
+++ b/String.php
@@ -216,7 +216,7 @@ class String implements \ArrayAccess, \Countable, \IteratorAggregate {
*/
public function __construct ( $string = null ) {
- if(false === extension_loaded('mbstring'))
+ if(false === function_exists('mb_strlen'))
throw new Exception(
'%s needs the mbstring extension.', 0, get_class($this));