From:             nightcat at poczta dot onet dot pl
Operating system: Linux
PHP version:      5.0.1
PHP Bug Type:     Zend Engine 2 problem
Bug description:  NULL can't be send as argument if type_hinted

Description:
------------
PHP breaks OOB by not accepting null as a proper value for type_hinted
argument.

In every OO language i know i have the way to dereference non-primitive
object to null. Without this, i have to make _very_ big mess in code to
make such things work.

Reproduce code:
---------------
class Foo {
}

function x(Foo $a, Foo $x) {
}

$l = new Foo();

x(null, $l);

Expected result:
----------------
normal work

Actual result:
--------------
Fatal error: Argument 1 must not be null in file.php in line 7

-- 
Edit bug report at http://bugs.php.net/?id=30007&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=30007&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=30007&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=30007&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=30007&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=30007&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=30007&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=30007&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=30007&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=30007&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=30007&r=notwrong
Not enough info:             http://bugs.php.net/fix.php?id=30007&r=notenoughinfo
Submitted twice:             http://bugs.php.net/fix.php?id=30007&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=30007&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=30007&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=30007&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=30007&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=30007&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=30007&r=float
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=30007&r=mysqlcfg

Reply via email to