From 3f1bfd36850d405b730f02067e73afd01b9dd3c0 Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Thu, 20 Jul 2006 03:52:02 +0000 Subject: [PATCH] Attempt to capture the source of erroneous input to grab_comments() using error_log::logBackTrace() --- include/comment.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/comment.php b/include/comment.php index 1500384..cd059ea 100644 --- a/include/comment.php +++ b/include/comment.php @@ -254,6 +254,16 @@ class Comment { */ function grab_comments($iVersionId, $iParentId = null) { + /* TODO: remove the logging when we figure out where the */ + /* invalid $iVersionId is coming */ + /* if $iVersionId is invalid we should log where we came from */ + /* so we can debug the problem */ + if($iVersionId == "") + { + error_log::logBackTrace("logging iVersionId oddity"); + return NULL; + } + /* escape input so we can use query_appdb() without concern */ $iVersionId = mysql_real_escape_string($iVersionId); $iParentId = mysql_real_escape_string($iParentId);