From 47889613b9c8d303350d10ccb7d72e1bd489e996 Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Fri, 13 Feb 2009 19:23:04 +0000 Subject: [PATCH] Document why a check exists in canShowDebug. --- lib/WebGUI/Session/ErrorHandler.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/WebGUI/Session/ErrorHandler.pm b/lib/WebGUI/Session/ErrorHandler.pm index c438feb59..50c5fd1eb 100644 --- a/lib/WebGUI/Session/ErrorHandler.pm +++ b/lib/WebGUI/Session/ErrorHandler.pm @@ -110,7 +110,10 @@ Returns true if the user meets the condition to see debugging information and de sub canShowDebug { my $self = shift; + + ##This check prevents in infinite loop during startup. return 0 unless ($self->session->hasSettings); + return 0 unless ($self->session->setting->get("showDebug")); return 0 unless (substr($self->session->http->getMimeType(),0,9) eq "text/html"); return $self->canShowBasedOnIP('debugIp');