Re: Empty Delimiter error
| From: | Rich Pinder | Date: | Mon, 15 Apr 2002 16:53:31 +0000 |
| Subject: | Re: Empty Delimiter error | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-93041@lists.php.net to get a copy of this message | ||
Thanks so much Daniel.
Indeed, the old line that I modified didnt use a function call.
The old line was:
if ($lines[$key] != $email){
So, the @ suggestion works just fine:
if (!@stristr($lines[$key], $email)) {
Seems like a cryptic syntax for an error code of this meaning - and odd
that all the PHP sources I searched before posting here came up empty
for the terminology.
Thanks again
Rich
Daniel Grace wrote:
>
> "Rich Pinder" <rpinder@usc.edu> wrote in message
> news:3CB8953A.4D4B669C@usc.edu...
> > Let me try again:
> >
> > This line of the script:
> >
> > if (!stristr($lines[$key], $email)) {
> >
> >
> > yields the following error:
> > Warning: Empty delimiter in /home/sites/site56/web.........
> >
> >
> > Do you know what causes this error ?
> >
> > Thanks
> > r
>
> My guess is that $email is empty (or possibly $lines[$key]). The
> documentation for stristr says nothing about generating warnings on such an
> occurance, but it would make sense.
>
> If your script can handle $email being empty, simply adjust your level of
> error-reporting or silence the warning with an @. Otherwise, fix whatever
> it is that's causing $email to be empty.
>
> -- Daniel Grace