summaryrefslogtreecommitdiff
path: root/php/src
diff options
context:
space:
mode:
Diffstat (limited to 'php/src')
-rw-r--r--php/src/php7/Operation.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/php/src/php7/Operation.cpp b/php/src/php7/Operation.cpp
index 8bd77d66cb1..81b05817eb7 100644
--- a/php/src/php7/Operation.cpp
+++ b/php/src/php7/Operation.cpp
@@ -383,22 +383,24 @@ IcePHP::OperationI::convertParam(zval* p, int pos)
void
IcePHP::OperationI::getArgInfo(zend_internal_arg_info& arg, const ParamInfoPtr& info, bool out)
{
- arg.name = 0;
- arg.class_name = 0;
- arg.allow_null = 1;
-
- if(!info->optional)
+ const zend_uchar pass_by_ref = out ? 1 : 0;
+ const zend_bool allow_null = 1;
+ if(!info->optional && (SequenceInfoPtr::dynamicCast(info->type) || DictionaryInfoPtr::dynamicCast(info->type)))
{
- const bool isArray = SequenceInfoPtr::dynamicCast(info->type) || DictionaryInfoPtr::dynamicCast(info->type);
- arg.type_hint = isArray ? IS_ARRAY : 0;
-
+ zend_internal_arg_info ai[] =
+ {
+ ZEND_ARG_ARRAY_INFO(pass_by_ref, 0, allow_null)
+ };
+ arg = ai[0];
}
else
{
- arg.type_hint = 0;
+ zend_internal_arg_info ai[] =
+ {
+ ZEND_ARG_CALLABLE_INFO(pass_by_ref, 0, allow_null)
+ };
+ arg = ai[0];
}
-
- arg.pass_by_reference = out ? 1 : 0;
}
//