From eaa525a080e385725140b65def2ba2bfa28fcc24 Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Thu, 8 Jun 2006 22:04:38 +0200 Subject: fix for utf8_strpos #827 darcs-hash:20060608200438-7ad00-05fbb18c15df64725ca4ef1ffdc0aa817a508ea4.gz --- inc/utf8.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'inc/utf8.php') diff --git a/inc/utf8.php b/inc/utf8.php index 41f410753..578745f9b 100644 --- a/inc/utf8.php +++ b/inc/utf8.php @@ -386,7 +386,7 @@ function utf8_strpos($haystack, $needle,$offset=0) { if(UTF8_MBSTRING) return mb_strpos($haystack,$needle,$offset,'utf-8'); if(!$offset){ - $ar = utf8_explode($needle, $str); + $ar = utf8_explode($needle, $haystack); if ( count($ar) > 1 ) { return utf8_strlen($ar[0]); } @@ -397,9 +397,9 @@ function utf8_strpos($haystack, $needle,$offset=0) { return false; } - $str = utf8_substr($str, $offset); + $haystack = utf8_substr($haystack, $offset); - if ( false !== ($pos = utf8_strpos($str,$needle))){ + if ( false !== ($pos = utf8_strpos($haystack,$needle))){ return $pos + $offset; } return false; -- cgit v1.2.3