summaryrefslogtreecommitdiff
path: root/inc/utf8.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-06-08 22:04:38 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-06-08 22:04:38 +0200
commiteaa525a080e385725140b65def2ba2bfa28fcc24 (patch)
treee78d9db950d4dcaf93b15714d5a426abfd7a3a7c /inc/utf8.php
parent33225f5153fdf492cb988b63ff9a3d0ff92ec23d (diff)
downloadrpg-eaa525a080e385725140b65def2ba2bfa28fcc24.tar.gz
rpg-eaa525a080e385725140b65def2ba2bfa28fcc24.tar.bz2
fix for utf8_strpos #827
darcs-hash:20060608200438-7ad00-05fbb18c15df64725ca4ef1ffdc0aa817a508ea4.gz
Diffstat (limited to 'inc/utf8.php')
-rw-r--r--inc/utf8.php6
1 files changed, 3 insertions, 3 deletions
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;