summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Keller <me@kelunik.com>2015-07-02 20:34:49 +0200
committerBob Weinand <bobwei9@hotmail.com>2015-07-02 21:14:30 +0200
commit5f72d94a8b4f4c070fd4959114f27448074a4a9e (patch)
treee1e7a1db213a8b328053b458f774c5775fa7fb92
parent6ff72467dc2595183ef31b30b4d4195f65a78f57 (diff)
downloadphp-git-5f72d94a8b4f4c070fd4959114f27448074a4a9e.tar.gz
Correct type hint name for booleans in method signatures
-rw-r--r--Zend/zend_inheritance.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Zend/zend_inheritance.c b/Zend/zend_inheritance.c
index f1a6d60a2d..64e7407f12 100644
--- a/Zend/zend_inheritance.c
+++ b/Zend/zend_inheritance.c
@@ -178,7 +178,7 @@ static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_inf
zend_string *fe_class_name, *proto_class_name;
const char *class_name;
- if (fe->type == ZEND_INTERNAL_FUNCTION) {
+ if (fe->type == ZEND_INTERNAL_FUNCTION) {
fe_class_name = NULL;
class_name = ((zend_internal_arg_info*)fe_arg_info)->class_name;
} else {
@@ -195,7 +195,7 @@ static int zend_do_perform_type_hint_check(const zend_function *fe, zend_arg_inf
fe_class_name = zend_string_init(class_name, strlen(class_name), 0);
}
- if (proto->type == ZEND_INTERNAL_FUNCTION) {
+ if (proto->type == ZEND_INTERNAL_FUNCTION) {
proto_class_name = NULL;
class_name = ((zend_internal_arg_info*)proto_arg_info)->class_name;
} else {
@@ -374,6 +374,8 @@ static void zend_append_type_hint(smart_str *str, const zend_function *fptr, zen
} else if (arg_info->type_hint) {
if (arg_info->type_hint == IS_LONG) {
smart_str_appendl(str, "int", 3);
+ } else if (arg_info->type_hint == _IS_BOOL) {
+ smart_str_appendl(str, "bool", 4);
} else {
const char *type_name = zend_get_type_by_const(arg_info->type_hint);
smart_str_appends(str, type_name);