Created
February 9, 2015 22:05
-
-
Save ircmaxell/21b56c9f9b7f8f3d09b3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Zend/zend_API.h b/Zend/zend_API.h | |
index 4f12834..8094dda 100644 | |
--- a/Zend/zend_API.h | |
+++ b/Zend/zend_API.h | |
@@ -1189,12 +1189,10 @@ static zend_always_inline int zend_parse_arg_str(zval *arg, zend_string **dest, | |
if (check_null && UNEXPECTED(Z_TYPE_P(arg) == IS_NULL)) { | |
*dest = NULL; | |
} else { | |
- if (Z_COPYABLE_P(arg) && Z_REFCOUNT_P(arg) > 1) { | |
- Z_DELREF_P(arg); | |
- zval_copy_ctor_func(arg); | |
- } | |
- convert_to_string(arg); | |
- *dest = Z_STR_P(arg); | |
+ zval converted; | |
+ ZVAL_COPY_VALUE(&converted, arg); | |
+ convert_to_string(&converted); | |
+ *dest = Z_STR(converted); | |
} | |
} else if (UNEXPECTED(Z_TYPE_P(arg) != IS_OBJECT) || | |
UNEXPECTED(parse_arg_object_to_str(arg, dest, IS_STRING) != SUCCESS)) { |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Oh, I can't ping people on Gist. Guess I'll have to make a pull request.