From 2244a208431896bff9280d1cecc62e44c7f7fef9 Mon Sep 17 00:00:00 2001 From: KS Date: Tue, 5 Aug 2025 18:05:23 +0300 Subject: [PATCH] nginx: fix PHP 8.2+ deprecation warnings (#4872) * fix PHP 8.2+ deprecation warnings * revision bump --- www/nginx/Makefile | 2 +- www/nginx/src/opnsense/scripts/nginx/ngx_autoblock.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/www/nginx/Makefile b/www/nginx/Makefile index 781e7d001..a952c7337 100644 --- a/www/nginx/Makefile +++ b/www/nginx/Makefile @@ -1,6 +1,6 @@ PLUGIN_NAME= nginx PLUGIN_VERSION= 1.34 -PLUGIN_REVISION= 7 +PLUGIN_REVISION= 8 PLUGIN_COMMENT= Nginx HTTP server and reverse proxy PLUGIN_DEPENDS= nginx PLUGIN_MAINTAINER= franz.fabian.94@gmail.com diff --git a/www/nginx/src/opnsense/scripts/nginx/ngx_autoblock.php b/www/nginx/src/opnsense/scripts/nginx/ngx_autoblock.php index d43ea8f98..7a4ee048e 100755 --- a/www/nginx/src/opnsense/scripts/nginx/ngx_autoblock.php +++ b/www/nginx/src/opnsense/scripts/nginx/ngx_autoblock.php @@ -76,7 +76,7 @@ function modify_blocklist($tablename, array $allIps, $operation = "add"): void foreach (array_chunk($allIps, $chunkSize) as $ips) { $escapedIps = join(" ", array_map("escapeshellarg", $ips)); - exec_hidden("/sbin/pfctl -t ${tablename} -T ${operation} ${escapedIps}"); + exec_hidden("/sbin/pfctl -t {$tablename} -T {$operation} {$escapedIps}"); } } @@ -89,7 +89,7 @@ function read_all_from_blocklist($tablename) 2 => ['file', "/dev/null", "w"], ]; - $process = proc_open("/sbin/pfctl -t ${tablename} -T show", $descriptorspec, $pipes); + $process = proc_open("/sbin/pfctl -t {$tablename} -T show", $descriptorspec, $pipes); if (is_resource($process)) { $ips = []; while ($ip = fgets($pipes[1], 96)) {