mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Don't read picture file if it does not exist
This commit is contained in:
parent
29c5272404
commit
12b8f3c95f
@ -29,7 +29,11 @@ if ($_GET['getpic']=="true") {
|
||||
$pic_type = $pic_type_s[1];
|
||||
|
||||
if ($user_settings['widgets'][$_GET['widgetkey']]['picturewidget']) {
|
||||
$data = file_get_contents("/conf/widget_image." . $_GET['widgetkey']);
|
||||
if (file_exists("/conf/widget_image." . $_GET['widgetkey'])) {
|
||||
$data = file_get_contents("/conf/widget_image." . $_GET['widgetkey']);
|
||||
} else {
|
||||
$data = "";
|
||||
}
|
||||
}
|
||||
|
||||
header("Content-Disposition: inline; filename=\"{$user_settings['widgets'][$_GET['widgetkey']]['picturewidget_filename']}\"");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user