diff options
author | Pim van den Berg | 2013-09-14 12:42:14 +0200 |
---|---|---|
committer | Pim van den Berg | 2013-09-14 12:42:14 +0200 |
commit | e7dcbd911ee813e33e0f307cb430ba102b1c7144 (patch) | |
tree | 02f05948c7f168640880ee891dfa9d1e0eb15a14 | |
parent | solve undefined index cat in index.php (diff) | |
download | apt-panopticon_cgp-e7dcbd911ee813e33e0f307cb430ba102b1c7144.zip apt-panopticon_cgp-e7dcbd911ee813e33e0f307cb430ba102b1c7144.tar.gz apt-panopticon_cgp-e7dcbd911ee813e33e0f307cb430ba102b1c7144.tar.bz2 apt-panopticon_cgp-e7dcbd911ee813e33e0f307cb430ba102b1c7144.tar.xz |
rrd.php: ob_clean if ob_get_length to prevent from a php notice
Reported-by: tbleiker (https://github.com/pommi/CGP/issues/26)
Diffstat (limited to '')
-rw-r--r-- | rrd.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -8,9 +8,9 @@ if ($file = validateRRDPath($CONFIG['datadir'], $_SERVER['PATH_INFO'])) { | |||
8 | header('Content-Type: application/octet-stream'); | 8 | header('Content-Type: application/octet-stream'); |
9 | header('Content-Disposition: attachment; filename='.basename($file)); | 9 | header('Content-Disposition: attachment; filename='.basename($file)); |
10 | header("Expires: " .date(DATE_RFC822,strtotime($CONFIG['cache']." seconds"))); | 10 | header("Expires: " .date(DATE_RFC822,strtotime($CONFIG['cache']." seconds"))); |
11 | ob_clean(); | 11 | if(ob_get_length()) ob_clean(); |
12 | flush(); | 12 | flush(); |
13 | readfile($file); | 13 | readfile($file); |
14 | } else { | 14 | } else { |
15 | header('HTTP/1.0 403 Forbidden'); | 15 | header('HTTP/1.0 403 Forbidden'); |
16 | 16 | ||