Skip to content

Commit 6ef203a

Browse files
committed
correct error message for incomplete class instantiation
1 parent a689ada commit 6ef203a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/standard/incomplete_class.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static zend_function *incomplete_class_get_method(zend_object **object, zend_str
9898
/* {{{ Private constructor preventing instantiation */
9999
static ZEND_COLD zend_function *incomplete_class_get_constructor(zend_object *object) /* {{{ */
100100
{
101-
zend_throw_error(NULL, "Instantiation of class Closure is not allowed");
101+
zend_throw_error(NULL, "Instantiation of class __PHP_Incomplete_Class is not allowed");
102102
return NULL;
103103
}
104104

ext/standard/tests/serialize/incomplete_class_constructor.phpt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var_dump(new __PHP_Incomplete_Class());
88
--EXPECTF--
99
string(22) "__PHP_Incomplete_Class"
1010

11-
Fatal error: Uncaught Error: Instantiation of class Closure is not allowed in %s:%d
11+
Fatal error: Uncaught Error: Instantiation of class __PHP_Incomplete_Class is not allowed in %s:%d
1212
Stack trace:
1313
#0 {main}
1414
thrown in %s on line %d

0 commit comments

Comments
 (0)