summaryrefslogtreecommitdiff
path: root/ext/com_dotnet/com_handlers.c
diff options
context:
space:
mode:
authorNikita Popov <nikita.ppv@gmail.com>2019-09-23 16:33:24 +0200
committerNikita Popov <nikita.ppv@gmail.com>2019-09-23 16:39:52 +0200
commit3012d006ff4da73679fca9f0d78a82492fcd0b7a (patch)
tree8a8d552b816ff7ccc5ea15411929a92c335c050a /ext/com_dotnet/com_handlers.c
parente441378b5422908474863a34cfa6f983a536ce5c (diff)
downloadphp-git-3012d006ff4da73679fca9f0d78a82492fcd0b7a.tar.gz
Don't set nullability flag for parameters without type
Use value 0 instead. To compensate we check in ReflectionParameter allowsNull() whether the type is set at all: If it isn't, it always allows null. This removes a discrepancy between internal&userland functions: For userland functions allowsNull() on untyped parameters returned true, but for internal functions it returned false.
Diffstat (limited to 'ext/com_dotnet/com_handlers.c')
-rw-r--r--ext/com_dotnet/com_handlers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c
index fd4cb4ab3b..092e65db57 100644
--- a/ext/com_dotnet/com_handlers.c
+++ b/ext/com_dotnet/com_handlers.c
@@ -319,7 +319,7 @@ static zend_function *com_method_get(zend_object **object_ptr, zend_string *name
f.arg_info = ecalloc(bindptr.lpfuncdesc->cParams, sizeof(zend_arg_info));
for (i = 0; i < bindptr.lpfuncdesc->cParams; i++) {
- f.arg_info[i].type = ZEND_TYPE_ENCODE_CODE(0,1);
+ f.arg_info[i].type = ZEND_TYPE_ENCODE_NONE();
if (bindptr.lpfuncdesc->lprgelemdescParam[i].paramdesc.wParamFlags & PARAMFLAG_FOUT) {
f.arg_info[i].pass_by_reference = ZEND_SEND_BY_REF;
}