Jump to content

Warning: strpos() [function.strpos]: Empty delimiter.


wmguk

Recommended Posts

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?

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.