diff options
-rwxr-xr-x | LedgerSMB/User.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index ee870d7c..5e06a2e0 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -458,7 +458,10 @@ sub process_query { $ENV{PGDATABASE} = $form->{db}; $results = `psql -f $filename 2>&1`; - if ($? or ($results =~ /error/i)){ + if ($?){ + $form->error($!); + } + elsif ($results =~ /error/i){ $form->error($results); } } |