From 0a668475d8c88f9345dbda1fda34b9baca0acb13 Mon Sep 17 00:00:00 2001 From: billz Date: Thu, 27 Nov 2025 12:18:25 +0100 Subject: [PATCH] Fix PHP undefined var warning --- includes/functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/functions.php b/includes/functions.php index 54abfb09..d0970f3b 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -112,6 +112,9 @@ function getProviderValue($id, $key) if (!isset($obj['providers']) || !is_array($obj['providers'])) { return false; } + if ($id === null || !is_numeric($id)) { + return false; + } $id--; if (!isset($obj['providers'][$id]) || !is_array($obj['providers'][$id])) { return false;