Re: Function returning but continues execution
| From: | Roman Neuhauser | Date: | Mon, 22 Jan 2007 16:32:21 +0000 |
| Subject: | Re: Function returning but continues execution | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-247546@lists.php.net to get a copy of this message | ||
# david@emomentum.co.uk / 2007-01-22 15:17:16 +0000:
> The key is that the function is returning false but it continues to
> execute! If I stick in an exit; after the in_array() check at point #4,
> this doesn't happen. There are no other places where this function is
> called, and it is only called once.
>
> Strangely, if I force the values of the 2 variables
> before the in_array() check:
>
> $_SESSION['user']['friends'] = array(0 => 3);
> $friend['user_id'] = 3;
>
> it reacts as expected - the function returns false and no further code
> is executed.
>
> Anyone have any suggestions?
You have a bug somewhere in your code.
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991