summaryrefslogtreecommitdiff
path: root/Zend/zend_API.c
diff options
context:
space:
mode:
authorGabriel Caruso <carusogabriel34@gmail.com>2018-02-04 16:42:36 -0200
committerNikita Popov <nikita.ppv@gmail.com>2018-02-04 23:09:40 +0100
commitfef879a2d63899ed25f39b4581c16682afdd0a8f (patch)
treece12aa17bbd2db3d0cfd2cabda46e4bcdb074686 /Zend/zend_API.c
parentce1d69a1f6dcf15d43029301059c25e5bc09a577 (diff)
downloadphp-git-fef879a2d63899ed25f39b4581c16682afdd0a8f.tar.gz
Use bool instead of boolean while throwing a type error
PHP requires boolean typehints to be written "bool" and disallows "boolean" as an alias. This changes the error messages to match the actual type name and avoids confusing messages like "must be of type boolean, boolean given". This a followup to ce1d69a1f6dcf15d43029301059c25e5bc09a577, which implements the same change for integer->int.
Diffstat (limited to 'Zend/zend_API.c')
-rw-r--r--Zend/zend_API.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index d0ab8a31ec..a2638f6f02 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -105,7 +105,7 @@ ZEND_API char *zend_get_type_by_const(int type) /* {{{ */
case IS_FALSE:
case IS_TRUE:
case _IS_BOOL:
- return "boolean";
+ return "bool";
case IS_LONG:
return "int";
case IS_DOUBLE:
@@ -565,7 +565,7 @@ static const char *zend_parse_arg_impl(int arg_num, zval *arg, va_list *va, cons
}
if (!zend_parse_arg_bool(arg, p, is_null, check_null)) {
- return "boolean";
+ return "bool";
}
}
break;