diff --git a/Database/Base/BaseActiveRecord.php b/Database/Base/BaseActiveRecord.php index 814a4a2f..b8d405fb 100644 --- a/Database/Base/BaseActiveRecord.php +++ b/Database/Base/BaseActiveRecord.php @@ -228,8 +228,11 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess * @throws ReflectionException * @throws Exception */ - public static function findOne($param, $db = NULL): static + public static function findOne($param, $db = NULL): static|null { + if (is_bool($param)) { + return null; + } if (is_numeric($param)) { $primary = static::getColumns()->getPrimaryKeys(); if (empty($primary)) {