diff options
-rw-r--r-- | it.class | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -547,7 +547,7 @@ static function replace($replacements, $string, $p = array()) foreach ($replacements as $pattern => $dummy) $patterns[] = !preg_match('/\\\\[wb]|[!\x80-\xff]|\[\[:/i', $pattern) && !$p ? "!$pattern!i$encoding" : it::convertregex($pattern, $p); - $result = preg_replace($patterns, $replacements, $string, isset($p['limit']) ? $p['limit'] : -1); + $result = preg_replace((array)$patterns, $replacements, $string, isset($p['limit']) ? $p['limit'] : -1); if ($result === null && preg_last_error() == PREG_BAD_UTF8_ERROR) it::error("Invalid utf-8 in it::replace haystack: " . substr($string, 0, 500)); # UTF8SAFE |