Fix error management
This commit is contained in:
parent
d809825c21
commit
b3c4697c7d
2 changed files with 4 additions and 4 deletions
|
|
@ -244,7 +244,7 @@ class Mailing extends CommonObject
|
|||
global $conf, $langs;
|
||||
|
||||
// Check properties
|
||||
if ($this->body === 'InvalidHTMLStringCantBeCleaned') {
|
||||
if (preg_match('/^InvalidHTMLStringCantBeCleaned/', $this->body)) {
|
||||
$this->error = 'InvalidHTMLStringCantBeCleaned';
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -313,7 +313,7 @@ class Mailing extends CommonObject
|
|||
public function update($user, $notrigger = 0)
|
||||
{
|
||||
// Check properties
|
||||
if ($this->body === 'InvalidHTMLStringCantBeCleaned') {
|
||||
if (preg_match('/^InvalidHTMLStringCantBeCleaned/', $this->body)) {
|
||||
$this->error = 'InvalidHTMLStringCantBeCleaned';
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7604,7 +7604,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
|
|||
} catch (Exception $e) {
|
||||
// If error, invalid HTML string with no way to clean it
|
||||
//print $e->getMessage();
|
||||
$out = 'InvalidHTMLStringCantBeCleaned';
|
||||
$out = 'InvalidHTMLStringCantBeCleaned '.$e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -7640,7 +7640,7 @@ function dol_htmlwithnojs($stringtoencode, $nouseofiframesandbox = 0, $check = '
|
|||
} catch (Exception $e) {
|
||||
// If error, invalid HTML string with no way to clean it
|
||||
//print $e->getMessage();
|
||||
$out = 'InvalidHTMLStringCantBeCleaned';
|
||||
$out = 'InvalidHTMLStringCantBeCleaned '.$e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue