Fix tvSame for null-by-reference values

The dereference was too late.
Esse commit está contido em:
mwilliams
2013-06-19 07:48:34 -07:00
commit de Sara Golemon
commit dde3c9e8d8
3 arquivos alterados com 9 adições e 3 exclusões
+3 -3
Ver Arquivo
@@ -391,14 +391,14 @@ bool tvSame(const TypedValue* tv1, const TypedValue* tv2) {
assert(tvIsPlausible(tv1));
assert(tvIsPlausible(tv2));
tv1 = tvToCell(tv1);
tv2 = tvToCell(tv2);
bool const null1 = IS_NULL_TYPE(tv1->m_type);
bool const null2 = IS_NULL_TYPE(tv2->m_type);
if (null1 && null2) return true;
if (null1 || null2) return false;
tv1 = tvToCell(tv1);
tv2 = tvToCell(tv2);
switch (tv1->m_type) {
case KindOfInt64:
case KindOfBoolean:
+5
Ver Arquivo
@@ -0,0 +1,5 @@
<?php
$a = array(null);
$b =&$a[0];
var_dump(in_array(null, $a, true));
@@ -0,0 +1 @@
bool(true)