Skip to content

Commit

Permalink
Check hint value before considering instance read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
pbreteche committed Dec 17, 2024
1 parent f91da5b commit 9efe8d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -2968,7 +2968,7 @@ public function createEntity($className, array $data, &$hints = [])
$oid = spl_object_id($entity);
$this->registerManaged($entity, $id, $data);

if (isset($hints[Query::HINT_READ_ONLY])) {
if (isset($hints[Query::HINT_READ_ONLY]) && true === $hints[Query::HINT_READ_ONLY]) {
$this->readOnlyObjects[$oid] = true;
}
}
Expand Down

0 comments on commit 9efe8d9

Please sign in to comment.