Re: Function returning but continues execution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I can't see how there is a bug in my code if when I echo the contents of the 2 variables, they are exactly the same as when I set them manually. Except in the former the function "continues executing" but in the latter it doesn't.

I also cannot see how the function can return false and execute the SQl query when it is only called once.

David

Roman Neuhauser wrote:
# david@xxxxxxxxxxxxxxx / 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.


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux