From 177f4357d29d8a488686fd92da3acd5ef2d9b10b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bruno=20Pr=C3=A9mont?= Date: Sun, 1 Mar 2009 22:19:49 +0100 Subject: [PATCH] php-collection/graph.php: Add missing error500() function php-collection/graph.php: Add missing error500() function When a call to rrdtool fails or some other internal error occurs a HTTP error with code 500 and matching error image should be returned, added the missing error500() function which does this the same way as error404() and error400() functions. Signed-off-by: Florian Forster --- contrib/php-collection/graph.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/contrib/php-collection/graph.php b/contrib/php-collection/graph.php index e5365768..17749e06 100644 --- a/contrib/php-collection/graph.php +++ b/contrib/php-collection/graph.php @@ -112,6 +112,13 @@ function error400($title, $msg) { return error(400, "Bad request", $title, $msg); } +/** + * Incomplete / invalid request + */ +function error500($title, $msg) { + return error(500, "Internal error", $title, $msg); +} + // Process input arguments $host = read_var('host', $_GET, null); if (is_null($host)) -- 2.30.2