Merge pull request #429 from CrandellWS/patch-1

Fix for substitute value is ZERO=0
This commit is contained in:
Mark Baker 2014-12-05 21:37:16 +00:00
commit 51c72f30de
1 changed files with 1 additions and 1 deletions

View File

@ -710,7 +710,7 @@ if ((!function_exists('mb_str_replace')) &&
} }
foreach((array) $search as $key => $s) { foreach((array) $search as $key => $s) {
if($s == '') { if($s == '' && $s !== 0) {
continue; continue;
} }
$r = !is_array($replace) ? $replace : (array_key_exists($key, $replace) ? $replace[$key] : ''); $r = !is_array($replace) ? $replace : (array_key_exists($key, $replace) ? $replace[$key] : '');