Fix UnsetM with global base

If the global was not defined, it would try to return
a pointer into the MInstrCtx, which was not passed in.

We dont actually need it though, because in that case we can
just return a pointer to init_null_variant.
Esse commit está contido em:
mwilliams
2013-04-03 19:24:33 -07:00
commit de Sara Golemon
commit c4b56e312d
3 arquivos alterados com 6 adições e 2 exclusões
@@ -600,8 +600,7 @@ static inline TypedValue* baseGImpl(TypedValue *key,
varEnv->set(name, &tv);
base = varEnv->lookup(name);
} else {
tvWriteNull(&mis->tvScratch);
base = &mis->tvScratch;
return const_cast<TypedValue*>(init_null_variant.asTypedValue());
}
}
decRefStr(name);
+5
Ver Arquivo
@@ -0,0 +1,5 @@
<?php
function test($t) {
unset($GLOBALS['foo']['bar']);
}
test(null);
Ver Arquivo