Skip to content

Commit 510ad50

Browse files
committed
bugfix in Model
1 parent c1c7bfa commit 510ad50

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Persist/Model.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,10 +954,10 @@ private function recordIdentifier($className,$class){
954954
$reflectionProperty = $reflectionClass->getProperty($fieldName);
955955
$reflectionProperty->setAccessible(true);
956956
$fieldValue = $reflectionProperty->getValue($this);
957-
if($fieldValue == null){
958-
$fieldValue = 'IS NULL';
957+
if($fieldValue === null){
958+
$fieldValue = ' IS NULL';
959959
}else{
960-
$fieldValue = $connection->encodeForSQLInjection($fieldValue);
960+
$fieldValue = " = '".$connection->encodeForSQLInjection($fieldValue)."'";
961961
}
962962

963963
if($recordIdentifier != ""){

0 commit comments

Comments
 (0)