Skip to content
Browse files

- Just return FAILURE & allow NULL without emmidiate error

  • Loading branch information...
1 parent d9aea60 commit d77945ef78aead05a3adb6307ccedc12d0ca49ee Marcus Boerger committed Apr 5, 2005
Showing with 2 additions and 2 deletions.
  1. +2 −2 Zend/zend_interfaces.c
View
4 Zend/zend_interfaces.c
@@ -409,8 +409,8 @@ int zend_user_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len
switch(Z_TYPE_P(retval)) {
case IS_NULL:
/* we could also make this '*buf_len = 0' but this allows to skip variables */
- result = FAILURE;
- break;
+ zval_ptr_dtor(&retval);
+ return FAILURE;
case IS_STRING:
*buffer = estrndup(Z_STRVAL_P(retval), Z_STRLEN_P(retval));
*buf_len = Z_STRLEN_P(retval);

0 comments on commit d77945e

Please sign in to comment.
Something went wrong with that request. Please try again.