Skip to content

Commit

Permalink
fix: check if we have a string before passing it to trim
Browse files Browse the repository at this point in the history
  • Loading branch information
carlalexander committed Jan 12, 2025
1 parent a6a13d9 commit 601ee0e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Command/Database/ImportDatabaseCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@ private function importBackup(Connection $connection, string $filename)
$query = '';

$lines->each(function ($line) use ($pdo, &$query) {
if (!is_string($line)) {
return;
}

$line = trim($line);

if (str_starts_with($line, '--') || empty($line)) {
Expand Down

0 comments on commit 601ee0e

Please sign in to comment.