Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example diff
diff --git a/igbinary.c b/igbinary.c
index d439da7..64a2aa7 100644
--- a/igbinary.c
+++ b/igbinary.c
@@ -918,11 +918,15 @@ inline static int igbinary_serialize_array(struct igbinary_serialize_data *igsd,
switch (key_type) {
case HASH_KEY_IS_LONG:
- igbinary_serialize_long(igsd, key_index TSRMLS_CC);
+ if (igbinary_serialize_long(igsd, key_index TSRMLS_CC)) {
+ return 1;
+ }
break;
case HASH_KEY_IS_STRING:
- igbinary_serialize_string(igsd, key, key_len-1 TSRMLS_CC);
+ if (igbinary_serialize_string(igsd, key, key_len-1 TSRMLS_CC)) {
+ return 1;
+ }
break;
default:
zend_error(E_ERROR, "igbinary_serialize_array: key is not string nor array");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment