Skip to content

Commit 9efe8d9

Browse files
committed
Check hint value before considering instance read-only
1 parent f91da5b commit 9efe8d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/UnitOfWork.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2968,7 +2968,7 @@ public function createEntity($className, array $data, &$hints = [])
29682968
$oid = spl_object_id($entity);
29692969
$this->registerManaged($entity, $id, $data);
29702970

2971-
if (isset($hints[Query::HINT_READ_ONLY])) {
2971+
if (isset($hints[Query::HINT_READ_ONLY]) && true === $hints[Query::HINT_READ_ONLY]) {
29722972
$this->readOnlyObjects[$oid] = true;
29732973
}
29742974
}

0 commit comments

Comments
 (0)