mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
nginx: fix PHP 8.2+ deprecation warnings (#4872)
* fix PHP 8.2+ deprecation warnings * revision bump
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user