wmguk Posted September 9, 2010 Share Posted September 9, 2010 Hi Guys I've been trying to work on my OS Commerce site, but for some reason I'm getting this error on the main index.php page. Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account? Feel free to click any of the links below to access the main categories. Warning: strpos() [function.strpos]: Empty delimiter. in /var/www/vhosts/XXXXXX.co.uk/httpdocs/shop/index.php on line 319 319 shows this: if (isset($cPath) && strpos('_', $cPath)) { Any ideas where this error comes from? Quote Link to comment Share on other sites More sharing options...
rwwd Posted September 9, 2010 Share Posted September 9, 2010 You have your params mixed up:- http://uk2.php.net/manual/en/function.strpos.php strpos("Haystack","needle"); And make sure that the var you are checking in is actually populated too, just 'cos it's set doesn't mean as it's not empty:- if((isset($var) && !empty($var)) && strpos($var, '_')){ //case true } At least I think that's right, you get the idea though Cheers, Rw Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.