Closed bhsmither closed 1 month ago
In documents.email.inc.php, near line 346, there is:
if (!preg_match("/{$EMAIL_CONTENT}/", $_POST['template'][$key])) {
The problem is the $ will expand $EMAIL_CONTENT when in double-quotes. PHP complains about an undefined variable.
$
$EMAIL_CONTENT
Using single-quotes is still not enough because $ and {} are meta-characters in regex patterns.
{}
Suggest:
if (!preg_match('/\{\$EMAIL_CONTENT\}/', $_POST['template'][$key])) {
or, more simply:
if (strpos($_POST['template'][$key], '$EMAIL_CONTENT') === false) {
Thank you.
In documents.email.inc.php, near line 346, there is:
The problem is the
$
will expand$EMAIL_CONTENT
when in double-quotes. PHP complains about an undefined variable.Using single-quotes is still not enough because
$
and{}
are meta-characters in regex patterns.Suggest:
or, more simply: