From: Bruno Prémont Date: Sun, 1 Mar 2009 21:19:43 +0000 (+0100) Subject: php-collection: Fixes and multiple saved graph lists X-Git-Tag: collectd-4.6.2~5^2~11^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=26f1a6f7ca9b20cb917ec8b3df7affde2da8eac1;p=collectd.git php-collection: Fixes and multiple saved graph lists php-collection/functions.php: Fix collectd_flush() Some obsolete code in collectd_flush() caused PHP Notice errors and prevented caused the function to return before attempting to ask collectd to flush cache. Signed-off-by: Florian Forster --- diff --git a/contrib/php-collection/functions.php b/contrib/php-collection/functions.php index 9fb6116f..cb916abe 100644 --- a/contrib/php-collection/functions.php +++ b/contrib/php-collection/functions.php @@ -260,17 +260,6 @@ function collectd_flush($identifier) { if (is_null($identifier) || (is_array($identifier) && count($identifier) == 0) || !(is_string($identifier) || is_array($identifier))) return false; - if (is_null($host) || !is_string($host) || strlen($host) == 0) - return false; - if (is_null($plugin) || !is_string($plugin) || strlen($plugin) == 0) - return false; - if (is_null($pinst) || !is_string($pinst)) - return false; - if (is_null($type) || !is_string($type) || strlen($type) == 0) - return false; - if (is_null($tinst) || (is_array($tinst) && count($tinst) == 0) || !(is_string($tinst) || is_array($tinst))) - return false; - $u_errno = 0; $u_errmsg = ''; if ($socket = @fsockopen($config['collectd_sock'], 0, $u_errno, $u_errmsg)) {