From 90b5a8797a4aad1d7553a2fe22b6cfcfc97c6d3b Mon Sep 17 00:00:00 2001 From: belliash Date: Fri, 22 Mar 2019 08:59:12 +0100 Subject: [PATCH] Fix a bug allowing to pass an array as argument to the method/closure that takes a scalar. --- engine/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/vm.c b/engine/vm.c index 15244a6..f1d4321 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -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);