[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [2186] trunk/LedgerSMB/Template



Revision: 2186
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=2186&view=rev
Author:   einhverfr
Date:     2008-07-05 15:11:54 -0700 (Sat, 05 Jul 2008)

Log Message:
-----------
Fixing crashes when used with Math::BigInt::GMP

Modified Paths:
--------------
    trunk/LedgerSMB/Template/HTML.pm
    trunk/LedgerSMB/Template/LaTeX.pm

Modified: trunk/LedgerSMB/Template/HTML.pm
===================================================================
--- trunk/LedgerSMB/Template/HTML.pm	2008-07-04 23:04:16 UTC (rev 2185)
+++ trunk/LedgerSMB/Template/HTML.pm	2008-07-05 22:11:54 UTC (rev 2186)
@@ -66,9 +66,10 @@
         }
     } elsif (!$type) {
         return escapeHTML($rawvars);
-    } elsif ($type eq 'SCALAR') {
+    } elsif ($type eq 'SCALAR' or $type eq 'Math::BigInt::GMP') {
         return escapeHTML($$rawvars);
     } else { # Hashes and objects
+	print STDERR "$_ is $type:$rawvars";
         for ( keys %{$rawvars} ) {
             $vars->{preprocess($_)} = preprocess( $rawvars->{$_} );
         }

Modified: trunk/LedgerSMB/Template/LaTeX.pm
===================================================================
--- trunk/LedgerSMB/Template/LaTeX.pm	2008-07-04 23:04:16 UTC (rev 2185)
+++ trunk/LedgerSMB/Template/LaTeX.pm	2008-07-05 22:11:54 UTC (rev 2186)
@@ -71,7 +71,7 @@
 			push @{$vars}, preprocess($_);
 		}
 	} elsif (!$type or $type eq 'SCALAR') {
-		if ($type eq 'SCALAR') {
+		if ($type eq 'SCALAR' or $type eq 'Math::BigInt::GMP') {
 			$vars = $$rawvars;
 		} else {
 			$vars = $rawvars;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.