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:
@@ -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);
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?php
|
||||
function test($t) {
|
||||
unset($GLOBALS['foo']['bar']);
|
||||
}
|
||||
test(null);
|
||||
Referência em uma Nova Issue
Bloquear um usuário