diff options
author | sgiehl <stefan@piwik.org> | 2015-02-21 15:14:59 +0300 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2015-02-21 15:14:59 +0300 |
commit | 10ae6a47ee9a43bce587d1a60b4b5cffa85e5be9 (patch) | |
tree | b7a7054e5a805de5d52d67b618e4df976c6ea152 /plugins/DevicesDetection/functions.php | |
parent | 2721f4dcc5a595d9486b687956887a80b3a7ab11 (diff) |
fixes #7258 - avoid notices
Diffstat (limited to 'plugins/DevicesDetection/functions.php')
-rw-r--r-- | plugins/DevicesDetection/functions.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/DevicesDetection/functions.php b/plugins/DevicesDetection/functions.php index 5ca421abe9..9d875b32ab 100644 --- a/plugins/DevicesDetection/functions.php +++ b/plugins/DevicesDetection/functions.php @@ -49,7 +49,7 @@ function getBrowserNameWithVersion($label) $short = substr($label, 0, 2); $ver = substr($label, 3, 10); $browsers = BrowserParser::getAvailableBrowsers(); - if (array_key_exists($short, $browsers)) { + if ($short && array_key_exists($short, $browsers)) { return trim(ucfirst($browsers[$short]) . ' ' . $ver); } else { return Piwik::translate('General_Unknown'); @@ -60,7 +60,7 @@ function getBrowserName($label) { $short = substr($label, 0, 2); $browsers = BrowserParser::getAvailableBrowsers(); - if (array_key_exists($short, $browsers)) { + if ($short && array_key_exists($short, $browsers)) { return trim(ucfirst($browsers[$short])); } else { return Piwik::translate('General_Unknown'); |