com php-src: update the exception message to better match the actual check: ext/reflection/php_reflection.c ext/reflection/tests/Refl
ectionClass_newInstanceWithoutConstructor.phpt ext/reflec tion/tests/bug64007.phpt
| From: | Ferenc Kovacs | Date: | Wed, 30 Jul 2014 08:16:01 +0000 |
| Subject: | com php-src: update the exception message to better match the actual check: ext/reflection/php_reflection.c ext/reflection/tests/Refl ectionClass_newInstanceWithoutConstructor.phpt ext/reflec tion/tests/bug64007.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-79654@lists.php.net to get a copy of this message | ||
Commit: d18b16244c0cf3daf806bbad5a459fbd3195f152
Author: Ferenc Kovacs <tyrael@php.net> Wed, 30 Jul 2014 10:08:26 +0200
Parents: d586441d902ebabf2300b6724a2217e07bb12803
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d18b16244c0cf3daf806bbad5a459fbd3195f152
Log:
update the exception message to better match the actual check
Changed paths:
M ext/reflection/php_reflection.c
M ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt
M ext/reflection/tests/bug64007.phpt
Diff:
diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c
index 8ccd5e6..8e5fcad 100644
--- a/ext/reflection/php_reflection.c
+++ b/ext/reflection/php_reflection.c
@@ -4309,7 +4309,7 @@ ZEND_METHOD(reflection_class, newInstanceWithoutConstructor)
GET_REFLECTION_OBJECT_PTR(ce);
if (ce->create_object != NULL && ce->ce_flags & ZEND_ACC_FINAL_CLASS) {
- zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %s is an internal
class with a final __construct thus cannot be instantiated without invoking its constructor",
ce->name);
+ zend_throw_exception_ex(reflection_exception_ptr, 0 TSRMLS_CC, "Class %s is an internal
class marked as final that cannot be instantiated without invoking its constructor",
ce->name);
}
object_init_ex(return_value, ce);
diff --git a/ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt
b/ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt
index 580c573..dfe3e7f 100644
--- a/ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt
+++ b/ext/reflection/tests/ReflectionClass_newInstanceWithoutConstructor.phpt
@@ -31,7 +31,7 @@ object(stdClass)#%d (0) {
object(DateTime)#%d (0) {
}
-Fatal error: Uncaught exception 'ReflectionException' with message 'Class Generator
is an internal class with a final __construct thus cannot be instantiated without invoking its
constructor' in %sReflectionClass_newInstanceWithoutConstructor.php:%d
+Fatal error: Uncaught exception 'ReflectionException' with message 'Class Generator
is an internal class marked as final that cannot be instantiated without invoking its
constructor' in %sReflectionClass_newInstanceWithoutConstructor.php:%d
Stack trace:
#0 %sReflectionClass_newInstanceWithoutConstructor.php(%d):
ReflectionClass->newInstanceWithoutConstructor()
#1 {main}
diff --git a/ext/reflection/tests/bug64007.phpt b/ext/reflection/tests/bug64007.phpt
index df86093..ae3ec50 100644
--- a/ext/reflection/tests/bug64007.phpt
+++ b/ext/reflection/tests/bug64007.phpt
@@ -14,6 +14,6 @@ $generator = $reflection->newInstance();
var_dump($generator);
?>
--EXPECTF--
-string(%d) "Class Generator is an internal class with a final __construct thus cannot be
instantiated without invoking its constructor"
+string(%d) "Class Generator is an internal class marked as final that cannot be instantiated
without invoking its constructor"
Catchable fatal error: The "Generator" class is reserved for internal use and cannot be
manually instantiated in %sbug64007.php on line %d