fix: Доп. проверки значений

This commit is contained in:
origami11@yandex.ru 2025-11-12 19:41:24 +03:00
parent 33565c9f7e
commit b20ea0e7dc
8 changed files with 45 additions and 39 deletions

View file

@ -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;
}
}