Fix bug. Update readme.

This commit is contained in:
CismonX 2018-04-26 22:05:26 +08:00
parent cf9c9ed73d
commit 5f200100a8
2 changed files with 5 additions and 1 deletions

View File

@ -24,6 +24,10 @@ The `Collection` class implements `ArrayAccess` and `Countable` interface intern
* `empty()`, `count()` can be used on instance of `Collection`.
* Elements can be traversed via `foreach()` keyword.
### 2.3 Notes
* The `Collection::xxxTo()` methods will preserve the original key-value pairs of destination `Collection` when keys collide.
## 3. Example
Here is a simple example for how to work with arrays gracefully using this extension.

View File

@ -820,7 +820,7 @@ PHP_METHOD(Collection, get)
found = zend_hash_index_find(current, Z_LVAL_P(key));
else {
ERR_BAD_KEY_TYPE();
RETVAL_NULL();
RETURN_NULL();
}
if (found)
RETURN_ZVAL(found, 1, 0);