From 2d6bc2626648aba3f0d47e11529d5221d095d398 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 19 Dec 2005 17:15:10 +0000 Subject: [PATCH] r632: trim() all the data and make sure we have a valid field in diff() --- includes/class_history.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/includes/class_history.php b/includes/class_history.php index a8c8148..571613e 100644 --- a/includes/class_history.php +++ b/includes/class_history.php @@ -81,6 +81,15 @@ class History */ function diff($field, $initial, $final) { + $field = trim($field); + $initial = trim($initial); + $final = trim($final); + + if (empty($field)) + { + return -1; + } + if (empty($initial) AND empty($final)) { if (!$this->allowempty) -- 2.22.5