Your software
My Mautic version is: 2.16.2
My PHP version is: 7.3.14
Your problem
My problem is: I’d like to use dynamic content in mail with a filter similar to:
Date added greater than "7 days ago"
According to the PHP documentation, the string “7 days ago” should be valid. However, I get an error:
[2020-05-27 12:32:51] mautic.CRITICAL: Uncaught PHP Exception Exception: "DateTime::__construct(): Failed to parse time string ("7 days ago") at pos
ition 0 ("): Unexpected character" at /var/www/ems/app/bundles/EmailBundle/EventListener/MatchFilterForLeadTrait.php line 88 {"exception":"[object] (Exce
ption(code: 0): DateTime::__construct(): Failed to parse time string ("7 days ago") at position 0 ("): Unexpected character at /var/www/ems/app
/bundles/EmailBundle/EventListener/MatchFilterForLeadTrait.php:88)"} []
It looks to me as if the quotes are being escaped which is confusing PHP.
Is there a way of using relative times in dynamic content?