Skip to content

Commit

Permalink
fix: Added Check for Empty File Path
Browse files Browse the repository at this point in the history
  • Loading branch information
usernane committed May 13, 2024
1 parent 0c8bb61 commit b046fdf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion webfiori/framework/cli/commands/RunSQLQueryCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,12 @@ private function connectionBased($dbConnections) : int {
return -1;
}
} else {
$this->error('No such file: '.$fileObj->getAbsolutePath());
$path = $fileObj->getAbsolutePath();

if (strlen($path) == 0) {
$path = $file;
}
$this->error('No such file: '.$path);

return -1;
}
Expand Down

0 comments on commit b046fdf

Please sign in to comment.