From 667528d5b927f0f284a067b0e24c9ca7f26c28a4 Mon Sep 17 00:00:00 2001 From: wn_ Date: Sat, 23 Nov 2024 18:23:49 +0000 Subject: Use PHP 8 'str_' functions. A few more characters in some places, but helps with readability. --- classes/Db_Migrations.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes/Db_Migrations.php') 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"])); -- cgit v1.2.3-54-g00ecf