From f947b8faaef282b1f754665bd26fd8ddfc7723ec Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Mon, 9 Jan 2012 12:42:22 +0000 Subject: [PATCH] bug attribut fiche : add blank : label add exception --- include/class_fiche_attr.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/class_fiche_attr.php b/include/class_fiche_attr.php index 52b280e89..b8808996e 100644 --- a/include/class_fiche_attr.php +++ b/include/class_fiche_attr.php @@ -138,6 +138,7 @@ class Fiche_Attr } public function insert() { + try{ $this->verify(); /* please adapt */ $sql="insert into attr_def(ad_text @@ -151,12 +152,18 @@ class Fiche_Attr array( $this->ad_text,$this->ad_type,$this->ad_size,$this->ad_extra ) ); + } catch (Exception $e) + { + throw ($e); + } } public function update() { - if ( $this->verify() != 0 ) return; + try + { + $this->verify(); if ( $this->ad_id < 9000) return; /* please adapt */ $sql=" update attr_def set ad_text = $1 @@ -168,6 +175,11 @@ class Fiche_Attr ,$this->ad_type ,$this->ad_id,$this->ad_size,$this->ad_extra) ); + }catch (Exception $e) + { + throw ($e); + } + } /**