[BaseCollection] Treat the null index as "no index" only while adding new element, iow. do not treat empty string as "no index" behaviour

This commit is contained in:
Meritoo
2019-09-19 12:33:03 +02:00
parent d8e3d5e7cb
commit 872259e63d
4 changed files with 8 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ trait AddTrait
return;
}
if (null === $index || '' === $index) {
if (null === $index) {
$this->elements[] = $element;
return;