Attempt to capture the source of erroneous input to grab_comments() using error_log::logBackTrace()

This commit is contained in:
Chris Morgan
2006-07-20 03:52:02 +00:00
committed by WineHQ
parent 34594b6eb4
commit 3f1bfd3685

View File

@@ -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);