[PHP] Re: Empty Delimiter error

2002-04-15 Thread Rich Pinder

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 [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Empty delimiter error - ??

2002-04-13 Thread Rich Pinder

I'm totally unfamiliar with php, and making some slight modificiations
to Chris Heilmann's nice v 1.1 Newsleterscript.

What exactly is meant by an empty delimiter?  This code works just fine,
but I get the following error:

Warning: Empty delimiter in /home/sites/site56/web/trailcrew.php on line
63



# Put the entries into the array lines
$lines = explode(%,$content);
for ($key=1;$keysizeof($lines);$key++){
# when the email is not in the list, add the old entries
 if (!stristr($lines[$key], $email)) {
offending line - line 63
  $out .= %.$lines[$key];
 }
# when it's already in the list, set found
 else {
  $found=1;
 }
}


Thanks
Rich Pinder




[PHP] Empty Delimiter error

2002-04-13 Thread Rich Pinder

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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php