Version 5.0.13

This commit is contained in:
Neo committed 2025-12-19 19:04:57 -08:00
1 parent b89858b2ff
commit 5efe744c5f
1407 files changed
+69690 -30177

No files matched your search

+9 -3
View File
@@ -404,7 +404,7 @@ abstract class Email
*/
public function getAdvertisement( string $type='html' ): string
{
if( $advertisement = Advertisement::loadForEmail( $this->advertisementParams ) )
if( $this->type !== static::TYPE_TRANSACTIONAL and $advertisement = Advertisement::loadForEmail( $this->advertisementParams ) )
{
return $advertisement->toString( $type, $this );
}
@@ -1369,13 +1369,19 @@ abstract class Email
/**
* Makes HTML acceptable for use in emails
*
* @param string $text The text
* @param string|null $text The text
* @param Lang|null $language Language. If not provided, will use whatever is set in $this->language - provided for backwards compatibility with templates not sending one
* @param int|null $truncate NULL to not truncate, (int) to truncate to (int) chars
* @return string
*/
public function parseTextForEmail( string $text, Lang $language = NULL, int $truncate=NULL ): string
public function parseTextForEmail( ?string $text, Lang $language = NULL, int $truncate=NULL ): string
{
/* Text might be null because Item::content() can return null */
if( $text === null )
{
return '';
}
if ( $language === NULL )
{
$language = $this->language;