Fix bug. Add newline at EOF for stubs.
This commit is contained in:
parent
9a8204cada
commit
1b1595a801
|
@ -2366,9 +2366,11 @@ PHP_METHOD(Collection, set)
|
||||||
zend_array* current = COLLECTION_FETCH_CURRENT();
|
zend_array* current = COLLECTION_FETCH_CURRENT();
|
||||||
if (Z_TYPE_P(key) == IS_STRING) {
|
if (Z_TYPE_P(key) == IS_STRING) {
|
||||||
SEPARATE_CURRENT_COLLECTION(current);
|
SEPARATE_CURRENT_COLLECTION(current);
|
||||||
|
Z_TRY_ADDREF_P(value);
|
||||||
zend_hash_update(current, Z_STR_P(key), value);
|
zend_hash_update(current, Z_STR_P(key), value);
|
||||||
} else if (Z_TYPE_P(key) == IS_LONG) {
|
} else if (Z_TYPE_P(key) == IS_LONG) {
|
||||||
SEPARATE_CURRENT_COLLECTION(current);
|
SEPARATE_CURRENT_COLLECTION(current);
|
||||||
|
Z_TRY_ADDREF_P(value);
|
||||||
zend_hash_index_update(current, Z_LVAL_P(key), value);
|
zend_hash_index_update(current, Z_LVAL_P(key), value);
|
||||||
} else {
|
} else {
|
||||||
ERR_BAD_KEY_TYPE();
|
ERR_BAD_KEY_TYPE();
|
||||||
|
|
Reference in New Issue