From 514e07c7f35f22893575eec305dcd12bd36a0355 Mon Sep 17 00:00:00 2001 From: belliash Date: Fri, 21 Sep 2018 22:18:11 +0200 Subject: [PATCH] Fix static variables not containing any value. --- engine/vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/engine/vm.c b/engine/vm.c index abb21db..111d9be 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -4949,7 +4949,7 @@ static sxi32 VmByteCodeExec( /* Evaluate initialization expression (Any complex expression) */ VmLocalExec(&(*pVm), &pStatic->aByteCode, pObj); } - if(pObj->iFlags != pStatic->iFlags) { + if((pObj->iFlags & MEMOBJ_NULL) == 0 && pObj->iFlags != pStatic->iFlags) { PH7_VmThrowError(&(*pVm), PH7_CTX_ERR, "Value does not match the data type of '$%z' variable", &pStatic->sName); }