Skip to content

Instantly share code, notes, and snippets.

@dstogov
Last active October 12, 2017 17:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dstogov/53382540bdfee7b6c7dadf142dc437ed to your computer and use it in GitHub Desktop.
Save dstogov/53382540bdfee7b6c7dadf142dc437ed to your computer and use it in GitHub Desktop.
diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re
index e588a024d8..912d7be4c8 100644
--- a/ext/standard/var_unserializer.re
+++ b/ext/standard/var_unserializer.re
@@ -689,7 +689,8 @@ static int php_var_unserialize_internal(UNSERIALIZE_PARAMETER)
return 0;
}
- if (Z_ISUNDEF_P(rval_ref) || (Z_ISREF_P(rval_ref) && Z_ISUNDEF_P(Z_REFVAL_P(rval_ref)))) {
+ ZVAL_DEREF(rval_ref);
+ if (Z_TYPE_P(rval_ref) != IS_OBJECT) {
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment