diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-05-26 14:10:57 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-10 21:05:28 +0200 |
commit | d30cd7d7e7ddd0d06c18c47f43c7d2ee00de24a1 (patch) | |
tree | 33fdeac65ef66eb3db6066af396763fae391bef9 /Zend/zend_objects.c | |
parent | 2ad75ba78440eeffbde35a12c666d5f55aaf631a (diff) | |
download | php-git-d30cd7d7e7ddd0d06c18c47f43c7d2ee00de24a1.tar.gz |
Review the usage of apostrophes in error messages
Closes GH-5590
Diffstat (limited to 'Zend/zend_objects.c')
-rw-r--r-- | Zend/zend_objects.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Zend/zend_objects.c b/Zend/zend_objects.c index 14ca14a4b1..d7770ecad5 100644 --- a/Zend/zend_objects.c +++ b/Zend/zend_objects.c @@ -107,14 +107,16 @@ ZEND_API void zend_objects_destroy_object(zend_object *object) if (object->ce != scope) { zend_throw_error(NULL, - "Call to private %s::__destruct() from context '%s'", + "Call to private %s::__destruct() from %s%s", ZSTR_VAL(object->ce->name), - scope ? ZSTR_VAL(scope->name) : ""); + scope ? "scope " : "global scope", + scope ? ZSTR_VAL(scope->name) : "" + ); return; } } else { zend_error(E_WARNING, - "Call to private %s::__destruct() from context '' during shutdown ignored", + "Call to private %s::__destruct() from global scope during shutdown ignored", ZSTR_VAL(object->ce->name)); return; } @@ -126,14 +128,16 @@ ZEND_API void zend_objects_destroy_object(zend_object *object) if (!zend_check_protected(zend_get_function_root_class(destructor), scope)) { zend_throw_error(NULL, - "Call to protected %s::__destruct() from context '%s'", + "Call to protected %s::__destruct() from %s%s", ZSTR_VAL(object->ce->name), - scope ? ZSTR_VAL(scope->name) : ""); + scope ? "scope " : "global scope", + scope ? ZSTR_VAL(scope->name) : "" + ); return; } } else { zend_error(E_WARNING, - "Call to protected %s::__destruct() from context '' during shutdown ignored", + "Call to protected %s::__destruct() from global scope during shutdown ignored", ZSTR_VAL(object->ce->name)); return; } |