#24921 [Opn->Csd]: calling function with "Class Type Hints" arguments crashes PHP

From: Date: Sun, 03 Aug 2003 10:30:10 +0000
Subject: #24921 [Opn->Csd]: calling function with "Class Type Hints" arguments crashes PHP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-45254@lists.php.net to get a copy of this message
ID: 24921 Updated by: sniper@php.net -Summary: calling function with "Class Type Hints" arguments cause PHP crush Reported By: itotakas at msu dot edu -Status: Open +Status: Closed -Bug Type: Reproducible crash +Bug Type: Zend Engine 2 problem -Operating System: Win 2000 Pro SP4 +Operating System: * PHP Version: 5CVS-2003-08-02 (dev) New Comment: Output with latest CVS: Warning: Missing argument 1 for get() in /usr/src/web/php/php5/t.php on line 4 Fatal error: Argument 1 must be an instance of bug in /usr/src/web/php/php5/t.php on line 4 And no crash here. Previous Comments: ------------------------------------------------------------------------ [2003-08-02 14:23:11] itotakas at msu dot edu Description: ------------ calling function with "Class Type Hints" arguments cause PHP crush Reproduce code: --------------- <? class bug { function get(bug $bug) { return $bug; } } $bug = new bug; // PHP should report the missing argument here $bug->get(); ?> Expected result: ---------------- showing error "missing argument" Actual result: -------------- PHP crush ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24921&edit=1

« previous php.bugs (#45254) next »