From 7eec919f9063dd5f9e9f91cf787dba8e2c764fe7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 10 Feb 2010 17:10:36 +0000 Subject: [PATCH] Fix: Division by zero --- htdocs/compta/bank/budget.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 4976a350738..89fe9a44278 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2008 Laurent Destailleur + * Copyright (C) 2004-2010 Laurent Destailleur * Copytight (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -88,7 +88,7 @@ if ($result) print ''.$langs->trans("Total").''; print ''.price($total).''; - print ''.price(price2num($total / $totalnb, 'MT')).''; + print ''.price($totalnb?price2num($total / $totalnb, 'MT'):0).''; } else {