改名
This commit is contained in:
@@ -228,8 +228,11 @@ abstract class BaseActiveRecord extends Component implements IOrm, ArrayAccess
|
|||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @throws Exception
|
* @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)) {
|
if (is_numeric($param)) {
|
||||||
$primary = static::getColumns()->getPrimaryKeys();
|
$primary = static::getColumns()->getPrimaryKeys();
|
||||||
if (empty($primary)) {
|
if (empty($primary)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user