X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fautohandler;h=3cc8e1021b1764da697ab3c8e2a31c446fc4e73f;hp=b5b1071c1bff425ce553f84badbb01f4430beb57;hb=11bbf29de447fe39e9d7155fe280a0df70fa8c3c;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125 diff --git a/httemplate/autohandler b/httemplate/autohandler index b5b1071c1..3cc8e1021 100644 --- a/httemplate/autohandler +++ b/httemplate/autohandler @@ -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; }