diff options
author | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-04-24 10:58:46 +0200 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-05-18 08:27:00 +0200 |
commit | 1179686f62cf976c8bccc7564e5ed41a3c5eb3a5 (patch) | |
tree | 6e40981a0362e9fd5252c385b9cd95f906239920 /Zend/zend_API.c | |
parent | b1fddec7175948b7bb36f8316e7cae0124460934 (diff) | |
download | php-git-1179686f62cf976c8bccc7564e5ed41a3c5eb3a5.tar.gz |
Improve error messages for invalid property access
Closes GH-5446
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r-- | Zend/zend_API.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c index 01f9277214..cd72a6f156 100644 --- a/Zend/zend_API.c +++ b/Zend/zend_API.c @@ -133,7 +133,8 @@ ZEND_API const char *zend_get_type_by_const(int type) /* {{{ */ ZEND_API const char *zend_zval_type_name(const zval *arg) /* {{{ */ { ZVAL_DEREF(arg); - return zend_get_type_by_const(Z_TYPE_P(arg)); + + return Z_ISUNDEF_P(arg) ? "null" : zend_get_type_by_const(Z_TYPE_P(arg)); } /* }}} */ |