From 195f8f91e0abae915dcf120d1544bf76fcc177b9 Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Fri, 21 Aug 2015 17:53:16 +0200 Subject: [PATCH] Bug : error throw exception is invalid --- html/index.php | 2 +- include/class_acc_ledger.php | 4 ++-- include/class_acc_ledger_fin.php | 6 +++--- include/class_acc_ledger_info.php | 6 +++--- include/class_acc_ledger_purchase.php | 4 ++-- include/class_acc_ledger_sold.php | 4 ++-- include/class_anc_key.php | 2 +- include/constant.php | 2 +- 8 files changed, 15 insertions(+), 15 deletions(-) diff --git a/html/index.php b/html/index.php index b42a6d050..7809e5c3f 100644 --- a/html/index.php +++ b/html/index.php @@ -220,7 +220,7 @@ if (defined("RECOVER") && isset ($_REQUEST['recover']) ) } echo ' -version 6.8.1.5 - '.$my_domain.' +version 6.8.1.6 - '.$my_domain.'

diff --git a/include/class_acc_ledger.php b/include/class_acc_ledger.php index 8ae836a68..e49a45487 100644 --- a/include/class_acc_ledger.php +++ b/include/class_acc_ledger.php @@ -2387,7 +2387,7 @@ class Acc_Ledger extends jrn_def_sql return true; if ($g_parameter->MY_STRICT == 'N') return false; - throw Exception("Valeur invalid " . __FILE__ . ':' . __LINE__); + throw new Exception("Valeur invalid " . __FILE__ . ':' . __LINE__); } /** @@ -2403,7 +2403,7 @@ class Acc_Ledger extends jrn_def_sql return true; if ($g_parameter->MY_CHECK_PERIODE == 'N') return false; - throw Exception("Valeur invalid " . __FILE__ . ':' . __LINE__); + throw new Exception("Valeur invalid " . __FILE__ . ':' . __LINE__); } /** diff --git a/include/class_acc_ledger_fin.php b/include/class_acc_ledger_fin.php index ee6670e22..e58568bb1 100644 --- a/include/class_acc_ledger_fin.php +++ b/include/class_acc_ledger_fin.php @@ -292,7 +292,7 @@ class Acc_Ledger_Fin extends Acc_Ledger { if ($e->getCode() == 1) { - throw Exception(_("Aucune période ouverte")); + throw new Exception(_("Aucune période ouverte")); } } @@ -967,7 +967,7 @@ class Acc_Ledger_Fin extends Acc_Ledger __FILE__ . ':' . __LINE__ . ' ' . $e->getMessage(); $this->db->rollback(); - throw Exception($r); + throw new Exception($r); } $this->db->commit(); $r = ""; @@ -1012,7 +1012,7 @@ class Acc_Ledger_Fin extends Acc_Ledger $wLedger = $this->select_ledger('fin', 3); if ($wLedger == null) - throw Exception(_('Pas de journal disponible')); + throw new Exception(_('Pas de journal disponible')); if (count($wLedger->value) > 1) { diff --git a/include/class_acc_ledger_info.php b/include/class_acc_ledger_info.php index 5ac20d6a4..9b25fcd94 100644 --- a/include/class_acc_ledger_info.php +++ b/include/class_acc_ledger_info.php @@ -51,7 +51,7 @@ class Acc_Ledger_Info { echo 'Appel incorrecte '.__FILE__.__LINE__; var_dump($this); - throw Exception(_('appel incorrect')); + throw new Exception(_('appel incorrect')); } try { @@ -75,7 +75,7 @@ class Acc_Ledger_Info { echo 'Appel incorrecte '.__FILE__.__LINE__; var_dump($this); - throw Exception('appel incorrect'); + throw new Exception('appel incorrect'); } try { @@ -136,7 +136,7 @@ class Acc_Ledger_Info if ( ! isset ($this->jr_id) ) { echo "jr_id is not set ".__FILE__.__LINE__; - throw Exception('Error : jr_id not set'); + throw new Exception('Error : jr_id not set'); } $sql="select ji_id from jrn_info where jr_id=".$this->jr_id; diff --git a/include/class_acc_ledger_purchase.php b/include/class_acc_ledger_purchase.php index 31fd5ab2f..32e9567af 100644 --- a/include/class_acc_ledger_purchase.php +++ b/include/class_acc_ledger_purchase.php @@ -1017,7 +1017,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger { if ($e->getCode() == 1 ) { - throw Exception( _("Aucune période ouverte")); + throw new Exception( _("Aucune période ouverte")); } } @@ -1042,7 +1042,7 @@ class Acc_Ledger_Purchase extends Acc_Ledger $add_js.='update_row("sold_item");'; $wLedger=$this->select_ledger('ACH',2); - if ($wLedger == null) throw Exception(_('Pas de journal disponible')); + if ($wLedger == null) throw new Exception(_('Pas de journal disponible')); $wLedger->javascript="onChange='update_predef(\"ach\",\"f\",\"".$_REQUEST['ac']."\");$add_js'"; $wLedger->table=1; $f_jrn=$wLedger->input(); diff --git a/include/class_acc_ledger_sold.php b/include/class_acc_ledger_sold.php index e18fa20a6..7d82ae146 100644 --- a/include/class_acc_ledger_sold.php +++ b/include/class_acc_ledger_sold.php @@ -1057,7 +1057,7 @@ EOF; $l_form_per = $period->input(); } catch (Exception $e) { if ($e->getCode() == 1) { - throw Exception( _("Aucune période ouverte") ); + throw new Exception( _("Aucune période ouverte") ); } } $label = HtmlInput::infobulle(3); @@ -1077,7 +1077,7 @@ EOF; $wLedger = $this->select_ledger('VEN', 2); if ($wLedger == null) - throw Exception(_('Pas de journal disponible')); + throw new Exception(_('Pas de journal disponible')); $wLedger->table = 1; $wLedger->javascript = "onChange='update_predef(\"ven\",\"f\",\"".$_REQUEST['ac']."\");$add_js'"; $wLedger->label = " Journal " . HtmlInput::infobulle(2); diff --git a/include/class_anc_key.php b/include/class_anc_key.php index 1bada74e7..0e9263348 100644 --- a/include/class_anc_key.php +++ b/include/class_anc_key.php @@ -137,7 +137,7 @@ class Anc_Key $a_percent=$p_array['percent']; if (count($a_percent)==0) { - throw Exception(_('Aucune répartition')); + throw new Exception(_('Aucune répartition')); } $tot_percent=0; bcscale(4); diff --git a/include/constant.php b/include/constant.php index 26f0fc40e..d3a4cf405 100644 --- a/include/constant.php +++ b/include/constant.php @@ -73,7 +73,7 @@ define ('SMALLX','ⵝ'); -define ('SVNINFO',6815); +define ('SVNINFO',6816); define ("DEBUG",false); define ("LOGINPUT",false);