|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2016-01-30 06:06 UTC] laruence@php.net
[2016-01-30 06:06 UTC] laruence@php.net
-Status: Open
+Status: Closed
[2016-07-20 11:33 UTC] davey@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 22:00:01 2025 UTC |
Description: ------------ In debug mode, when we define return type info as object and specify class for it, e.g. ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(test_arginfo, ZEND_RETURN_VALUE, 0, IS_OBJECT, "ClassName", 0) ZEND_END_ARG_INFO() and then throw exception from function, e.g. PHP_FUNCTION(test) { if (zend_parse_parameters_none() == FAILURE) { return; } zend_throw_exception(zend_exception_get_default(), "Test exception", 0); } we have fatal error "Fatal error: Return value of test() must be an instance of ClassName, null returned in Unknown on line 0" While allow_null set to 1 fixes this problem, it is clearly a bug, while after exception thrown, method returned value not used, so no type check after exception should be performed (debug mode affected only).