Fix a bug allowing to pass an array as argument to the method/closure that takes a scalar.

This commit is contained in:
Rafal Kupiec 2019-03-22 08:59:12 +01:00
parent f83d6cc43d
commit 90b5a8797a
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 1 additions and 1 deletions

View File

@ -5087,7 +5087,7 @@ static sxi32 VmByteCodeExec(
}
}
}
} else if((aFormalArg[n].nType & MEMOBJ_MIXED) == 0 && (pArg->iFlags & aFormalArg[n].nType) == 0) {
} else if((aFormalArg[n].nType & MEMOBJ_MIXED) == 0 && pArg->iFlags != aFormalArg[n].nType) {
if(PH7_CheckVarCompat(pArg, aFormalArg[n].nType) == SXRET_OK) {
/* Silently typecast compatible value to expected data type */
ProcMemObjCast xCast = PH7_MemObjCastMethod(aFormalArg[n].nType);