From 297690b22c5540a61ad7d1732f779eaff9a05442 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sat, 9 Dec 2006 14:20:10 +0000 Subject: [PATCH] added php4.3 compatibility function stripos, to get back php4.3 compatibility after the recent replacement of stristr with stripos --- etemplate/inc/class.so_sql.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/etemplate/inc/class.so_sql.inc.php b/etemplate/inc/class.so_sql.inc.php index 8bce43d46e..b5dfd99a40 100644 --- a/etemplate/inc/class.so_sql.inc.php +++ b/etemplate/inc/class.so_sql.inc.php @@ -884,3 +884,14 @@ class so_sql return $cache[$cache_key] =& $ret; } } + +if (!function_exists("stripos")) +{ + /** + * stripos for php < 5 + */ + function stripos($str,$needle,$offset=0) + { + return strpos(strtolower($str),strtolower($needle),$offset); + } +}