From ff57e67f5574b6d8b94d5f5b4734e5c8bf2eb0a2 Mon Sep 17 00:00:00 2001 From: Nils Steinger Date: Tue, 22 Sep 2015 21:48:48 +0200 Subject: [PATCH] Check if variable is set before trying to read it --- includes/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 337445e0bd..f26027bdce 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -160,7 +160,7 @@ function getImageSrc($device) { if ($device['icon'] && file_exists($config['html_dir'] . "/images/os/" . $device['icon'] . ".png")) { $image = $config['base_url'] . '/images/os/' . $device['icon'] . '.png'; } - elseif ($config['os'][$device['os']]['icon'] && file_exists($config['html_dir'] . "/images/os/" . $config['os'][$device['os']]['icon'] . ".png")) { + elseif (isset($config['os'][$device['os']]['icon']) && $config['os'][$device['os']]['icon'] && file_exists($config['html_dir'] . "/images/os/" . $config['os'][$device['os']]['icon'] . ".png")) { $image = $config['base_url'] . '/images/os/' . $config['os'][$device['os']]['icon'] . '.png'; } else {