https://bugzilla.wikimedia.org/show_bug.cgi?id=66930

Max Semenik <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #3 from Max Semenik <[email protected]> ---
(In reply to Chad H. from comment #1)
> HHVM I think is being a little overzealous here though. Isn't null an
> acceptable value for a typed parameter?

$ php eval.php
> function f(stdClass $x) { echo get_class($x); }

> f(new stdClass);
stdClass
> f(null)
PHP Catchable fatal error:  Argument 1 passed to f() must be an instance of
stdClass, null given, called in /vagrant/mediawiki/maintenance/eval.php(81) :
eval()'d code on line 1 and defined in
/vagrant/mediawiki/maintenance/eval.php(81) : eval()'d code on line 1


$ hhvm -a
hphpd> function f(stdClass $x) { echo get_class($x); }
hphpd> f(new stdClass);
stdClass
hphpd> f(null);
Notice: Attempted to interpret unknown debugger command as PHP!

Hit fatal : Argument 1 passed to f() must be an instance of stdClass, null
given
    #0 at [:1]
    #1 f(), called at [:1]
    #2 include(), called at [:1]

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to