Skip to content

Commit b69cbbb

Browse files
committed
#152. Fix setParser with is_array check
1 parent e2c89a2 commit b69cbbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Controllers/BaseCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function actionIndex($files)
9999

100100
private function setParser($files)
101101
{
102-
$filename = empty($files[0]) ? $files : $files[0];
102+
$filename = is_array($files) ? $files[0] : $files;
103103
$ext = pathinfo($filename, PATHINFO_EXTENSION);
104104

105105
$this->parser = ($ext === 'json') ? Json::class : Yaml::class;

0 commit comments

Comments
 (0)