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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.