Skip to content

Commit 6a3c2d6

Browse files
bjoriderickr
authored andcommitted
+1 in PHP5, not PHP7
1 parent e27a4db commit 6a3c2d6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

phongo_compat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@
180180
# define PHONGO_STREAM_ID(stream) stream->rsrc_id
181181
# define ADD_ASSOC_STRING(_zv, _key, _value) add_assoc_string_ex(_zv, ZEND_STRS(_key), _value, 1);
182182
# define ADD_ASSOC_STRINGL(_zv, _key, _value, _len) add_assoc_stringl_ex(_zv, ZEND_STRS(_key), _value, _len, 1);
183-
# define ADD_ASSOC_STRING_EX(_zv, _key, _key_len, _value, _value_len) add_assoc_stringl_ex(_zv, _key, _key_len, _value, _value_len, 1);
183+
# define ADD_ASSOC_STRING_EX(_zv, _key, _key_len, _value, _value_len) add_assoc_stringl_ex(_zv, _key, _key_len+1, _value, _value_len, 1);
184184
# define Z_PHPDATE_P(object) zend_object_store_get_object(object TSRMLS_CC)
185185
# define Z_ISUNDEF(x) !x
186186
# define phongo_free_object_arg void

src/bson.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ bool php_phongo_bson_visit_utf8(const bson_iter_t *iter ARG_UNUSED, const char *
207207
{
208208
zval *retval = ((php_phongo_bson_state *)data)->zchild;
209209

210-
ADD_ASSOC_STRING_EX(retval, key, strlen(key)+1, (char *)v_utf8, v_utf8_len);
210+
ADD_ASSOC_STRING_EX(retval, key, strlen(key), (char *)v_utf8, v_utf8_len);
211211

212212
return false;
213213
}

0 commit comments

Comments
 (0)