fix bug. update readme.
This commit is contained in:
parent
e0e5cf2425
commit
3bf72f95e7
|
@ -11,7 +11,8 @@ Method names and functionalities are inspired by [Kotlin.Collections](https://ko
|
|||
|
||||
### 1.1 Notes
|
||||
|
||||
* This extension requires PHP 7.1 and above.
|
||||
* Requires PHP 7.1 and above.
|
||||
* Currently not working on MacOS. Fix in progress.
|
||||
|
||||
## 2. Documentation
|
||||
|
||||
|
|
|
@ -1009,7 +1009,7 @@ PHP_METHOD(Collection, last)
|
|||
RETURN_NULL();
|
||||
if (EX_NUM_ARGS() == 0) {
|
||||
HashPosition pos = current->nNumUsed;
|
||||
while (pos >= 0 && Z_ISUNDEF(current->arData[pos].val))
|
||||
while (pos <= current->nNumUsed && Z_ISUNDEF(current->arData[pos].val))
|
||||
--pos;
|
||||
RETURN_ZVAL(¤t->arData[pos].val, 1, 0);
|
||||
}
|
||||
|
|
Reference in New Issue