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();
|
||||||
|
|
|
@ -895,4 +895,4 @@ class Collection implements ArrayAccess, Countable
|
||||||
* @return Collection
|
* @return Collection
|
||||||
*/
|
*/
|
||||||
function values() {}
|
function values() {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,4 +26,4 @@ class Pair
|
||||||
* @param mixed $second
|
* @param mixed $second
|
||||||
*/
|
*/
|
||||||
function __construct($first, $second) {}
|
function __construct($first, $second) {}
|
||||||
}
|
}
|
||||||
|
|
Reference in New Issue