diff --git a/htdocs/actioncomm.class.php b/htdocs/actioncomm.class.php index b546470fc22..7a68a780000 100644 --- a/htdocs/actioncomm.class.php +++ b/htdocs/actioncomm.class.php @@ -114,11 +114,13 @@ class ActionComm } // Ajoute entrée dans webcal - $result=$webcal->add($author,$webcal->date,$webcal->texte,$webcal->desc); - if ($result < 0) { - $this->error="Echec insertion dans webcal: ".$webcal->error; + if (is_object($webcal)) + { + $result=$webcal->add($author,$webcal->date,$webcal->texte,$webcal->desc); + if ($result < 0) { + $this->error="Echec insertion dans webcal: ".$webcal->error; + } } - } return $this->id;