diff --git a/composer.json b/composer.json index 08825ee7..d6479867 100644 --- a/composer.json +++ b/composer.json @@ -26,9 +26,6 @@ } }, "autoload-dev": { - "files": [ - "scripts/TestCommand.php" - ], "psr-4": { "ActiveRecord\\Scripts\\": "scripts/", "test\\": "test/" diff --git a/lib/Model.php b/lib/Model.php index b4e27407..162f85b2 100644 --- a/lib/Model.php +++ b/lib/Model.php @@ -1794,7 +1794,7 @@ public static function find(/* $type, $options */): static|array|null $num_args = count($args); $single = true; - if (in_array($args[0], ['all', 'first', 'last'])) { + if (count($args) > 0 && in_array($args[0], ['all', 'first', 'last'])) { switch ($args[0]) { case 'all': $single = false;