Warning: stristr() Empty delimiter

Discussion in 'PHP' started by Andreit, Sep 19, 2010.

  1. #1
    how to resolve this problem?
    Warning: stristr() Empty delimiter
    PHP:

     
    Andreit, Sep 19, 2010 IP
  2. mirosoft1

    mirosoft1 Well-Known Member

    Messages:
    110
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    101
    #2
    please tell me the code you use on it this function???
     
    mirosoft1, Sep 19, 2010 IP
  3. Andreit

    Andreit Greenhorn

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #3
    if (strlen(stristr($link,$this->url))>0) 
    PHP:
     
    Andreit, Sep 19, 2010 IP
  4. dreamconception

    dreamconception Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    hmm, are you sure the $this->url is not null?
     
    dreamconception, Sep 19, 2010 IP
  5. Andreit

    Andreit Greenhorn

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #5
    null or null how to resolv this problem?
    Thanks!
     
    Andreit, Sep 19, 2010 IP
  6. dreamconception

    dreamconception Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Make sure that $this->url is set, try like
    
    $num = 0;
    if(isset($this->url) && $this->url!=null && $this->url!="") $num = strlen(stristr($link,$this->url));
    if ($num>0)
    
    Code (markup):
    Them you prevent the error. However you might want the url to be set, so please check that in your code.
     
    dreamconception, Sep 19, 2010 IP
    Andreit likes this.
  7. Andreit

    Andreit Greenhorn

    Messages:
    27
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #7
    thanks, it works!
     
    Andreit, Sep 19, 2010 IP
  8. almedajohnson

    almedajohnson Peon

    Messages:
    140
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    If your problem has been solved then close this thread
     
    almedajohnson, Sep 21, 2010 IP