* Thus wrote Mirek Novak ([EMAIL PROTECTED]):
> Hi everybody,
> 
> I have defined function
>       
>       function func ($var,$val,&$struct){
>               // do something
>       }
> 
> if I call this function following way
>       
>       func('a','b',NULL);
> 
> (because sometimes I don't need to set $struct)
> apache process (php) crashes without saying word into log...
> So, is it bug or feature.

A bug. php shouldn't die if a NULL is passed, it should give an
error as if you typed:
  func('a', 'b', 'c');

An error should complain about passing constant to reference.

But, it is fixed with 4.3.3RC1. so no need to submit a bug on it:

<?php
function foo($a, $b, &$c) { }
foo('a', 'b', NULL);
?>

Results:
Fatal error: Only variables can be passed by reference in
/usr/home/www/domains/dyndns.org/web/zirzow/_/php/tests/bugs/func_ref_null.php
on line 2


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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

Reply via email to