enable CardFortress in test database, #71513
[freeside.git] / httemplate / autohandler
index c326e3e..248f14a 100644 (file)
@@ -41,10 +41,10 @@ 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>
 <%cleanup>
-   dbh->commit();
+   dbh->commit() if dbh;
 </%cleanup>