fix: Доп. проверки значений
This commit is contained in:
parent
33565c9f7e
commit
b20ea0e7dc
8 changed files with 45 additions and 39 deletions
|
|
@ -66,8 +66,8 @@ class SQLStatementExtractor
|
|||
/**
|
||||
* Extract SQL statements from array of lines.
|
||||
*
|
||||
* @param list<string> $lines Lines of the read-in file.
|
||||
* @return list<string>
|
||||
* @param string[] $lines Lines of the read-in file.
|
||||
* @return string[] SQL statements
|
||||
*/
|
||||
protected static function extractStatements($lines)
|
||||
{
|
||||
|
|
@ -177,6 +177,6 @@ class SQLStatementExtractor
|
|||
protected static function getLines(string $buffer): array
|
||||
{
|
||||
$lines = preg_split("/\r?\n|\r/", $buffer);
|
||||
return $lines;
|
||||
return $lines === false ? [] : $lines;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue