diff options
| author | Andrew Dolgov <fox@fakecake.org> | 2024-11-24 14:06:57 +0000 |
|---|---|---|
| committer | Andrew Dolgov <fox@fakecake.org> | 2024-11-24 14:06:57 +0000 |
| commit | 103bafd90a33abc1478e7c4ec6b732ebd04a4995 (patch) | |
| tree | f28c7ece3584a7852b6562020246b1de6167774e /classes/Db_Migrations.php | |
| parent | 53fee911e6a39a5c8504d03d1f114a131d00784c (diff) | |
| parent | 667528d5b927f0f284a067b0e24c9ca7f26c28a4 (diff) | |
Merge branch 'feature/php8-str-funcs' into 'master'
Use PHP 8 'str_' functions.
See merge request tt-rss/tt-rss!81
Diffstat (limited to 'classes/Db_Migrations.php')
| -rw-r--r-- | classes/Db_Migrations.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/classes/Db_Migrations.php b/classes/Db_Migrations.php index c2a8c326d..7dcfc24b1 100644 --- a/classes/Db_Migrations.php +++ b/classes/Db_Migrations.php @@ -190,7 +190,7 @@ class Db_Migrations { if (file_exists($filename)) { $lines = array_filter(preg_split("/[\r\n]/", file_get_contents($filename)), - fn($line) => strlen(trim($line)) > 0 && strpos($line, "--") !== 0); + fn($line) => strlen(trim($line)) > 0 && !str_starts_with($line, "--")); return array_filter(explode(";", implode("", $lines)), fn($line) => strlen(trim($line)) > 0 && !in_array(strtolower($line), ["begin", "commit"])); |