From af6eae0ff1f2dcca16f86493b5052a3544c0a6f7 Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Wed, 11 Apr 2012 07:55:00 +0000 Subject: more verbose errmsg --- it.class | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'it.class') diff --git a/it.class b/it.class index 0aafcd4..5300370 100644 --- a/it.class +++ b/it.class @@ -384,7 +384,7 @@ static function replace($replacements, $string, $p = array()) $result = preg_replace($patterns, $replacements, $string, isset($p['limit']) ? $p['limit'] : -1); if ($result === null && preg_last_error() == PREG_BAD_UTF8_ERROR) - it::error("Input to it::replace is not valid utf-8"); + it::error("Invalid utf-8 in it::replace haystack: " . substr($string, 0, 500)); # UTF8SAFE return $result; } -- cgit v1.2.3