fix deprecated

This commit is contained in:
Km.Van
2026-07-11 16:55:04 +08:00
parent 9867f8ae50
commit dddcbd22a5
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ final class Action
{
// delay for server benchmark
(new ServerBenchmarkDelay())->delay();
$action = (string) filter_input(\INPUT_GET, 'action', \FILTER_DEFAULT);
$action = (string) filter_input(\INPUT_GET, 'action');
if ( !$action) {
return;
}
+2 -2
View File
@@ -13,7 +13,7 @@ final class NodesAction
if (NodesConstants::ID !== $action) {
return;
}
$nodeId = filter_input(\INPUT_GET, 'nodeId', \FILTER_DEFAULT);
$nodeId = filter_input(\INPUT_GET, 'nodeId');
$response = new RestResponse();
if ( !$nodeId) {
$response
@@ -41,7 +41,7 @@ final class NodesAction
}
$isDev = \defined('XPROBER_IS_DEV') && XPROBER_IS_DEV;
$url = $node['url'];
$isRemote = ( !str_contains($url, 'localhost') || !str_contains($url, '127.0.0.1'));
$isRemote = (false === strpos($url, 'localhost') && false === strpos($url, '127.0.0.1'));
$params = 'action=poll';
$url = ($isDev && !$isRemote) ? "{$url}/api?{$params}" : "{$url}?{$params}";