diff --git a/htdocs/core/class/html.formsms.class.php b/htdocs/core/class/html.formsms.class.php index 94e60ba8082..103b40e33df 100644 --- a/htdocs/core/class/html.formsms.class.php +++ b/htdocs/core/class/html.formsms.class.php @@ -205,8 +205,16 @@ function limitChars(textarea, limit, infodiv) try { $classname=ucfirst($classfile); - $sms = new $classname($this->db); - $resultsender = $sms->SmsSenderList(); + if (class_exists($classname)) + { + $sms = new $classname($this->db); + $resultsender = $sms->SmsSenderList(); + } + else + { + $sms = new stdClass(); + $sms->error='The SMS manager '.$classfile.' defined into SMS setup MAIN_SMS_SENDMODE is not found'; + } } catch(Exception $e) {