Page 1 of 1

Warning: eregi() [function.eregi]: REG_EMPTY

Posted: Sun Jul 13, 2008 5:00 am
by ankuj.gupta
I have been getting this error

Warning: eregi() [function.eregi]: REG_EMPTY in D:\xampp\htdocs\bilingual_dictionary\search.php on line 123

The code that is producing this error is

Code: Select all

 
function patternmatch($ill,$redirects,$pagelink)
 
{
        $i=0;
        while($pagelink[$i])
        {
    /*line 123*/        if(eregi($ill[$i],$pagelink[$i]))  
            {
                    $lts[]= $pagelink[$i];
            } 
            $i=$i+1;
        }
        return $lts;
}
What does this error mean
Thanks
Ankuj

Re: Warning: eregi() [function.eregi]: REG_EMPTY

Posted: Sun Jul 13, 2008 5:02 am
by jaoudestudios
It seems like you are passing an empty variable to the eregi function.

Check your $ill[$i], that it does not have an empty element.

Re: Warning: eregi() [function.eregi]: REG_EMPTY

Posted: Sun Jul 13, 2008 12:46 pm
by ankuj.gupta
I have retrieved the value of $ill[$i] and a value does exist there.But still it give the error

Re: Warning: eregi() [function.eregi]: REG_EMPTY

Posted: Sun Jul 13, 2008 12:53 pm
by jaoudestudios
The value that exists there is it a regular expression? because that is what it is expecting.

Manual...
http://uk3.php.net/manual/en/function.ereg.php