RT# 82949 - changes section name from fees to pricing, better opiton
[freeside.git] / httemplate / autohandler
index b5b1071..3cc8e10 100644 (file)
@@ -12,7 +12,7 @@ if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
 
   my $profile = '';
 
-  if ( lc($r->content_type) =~ /^text\/html/
+  if ( $r && lc($r->content_type) =~ /^text\/html/
        && $FS::CurrentUser::CurrentUser->option('show_db_profile')
      )
   {
@@ -41,7 +41,7 @@ if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
 
   dbh->{'private_profile'} = {};
 
-  s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)$/$profile$1/i;
+  s/(<\/BODY>[\s\n]*<\/HTML>[\s\n]*)/$profile$1/i;
 }
 
 </%filter>