Skip to content

Commit b13d6a1

Browse files
committed
Allow '0' or 0 id
1 parent 43bda2a commit b13d6a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/StaticEntityManager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function hasId($id)
133133
*/
134134
public function convertToId($staticEntity)
135135
{
136-
if (empty($staticEntity)) {
136+
if (empty($staticEntity) && '0' !== $staticEntity && 0 !== $staticEntity) {
137137
return null;
138138
} elseif ($staticEntity instanceof StaticEntity) {
139139
return $staticEntity->getId();

0 commit comments

Comments
 (0)