Fix deprecated usage of string functions

[MAILPOET-4001]
This commit is contained in:
Jan Lysý
2022-01-05 16:49:28 +01:00
committed by Veljko V
parent f249b379f8
commit 492415f3ae
5 changed files with 8 additions and 8 deletions

View File

@@ -104,13 +104,13 @@ class StylesHelper {
$textAlignment = isset($block['styles']['block']['textAlign']) ?
strtolower($block['styles']['block']['textAlign']) :
'';
if (preg_match('/center|right|justify/i', $textAlignment)) {
if (preg_match('/center|right|justify/i', (string)$textAlignment)) {
return $block;
}
$block['styles']['block']['textAlign'] = 'left';
return $block;
}
return (preg_match('/text-align.*?[center|justify|right]/i', $block)) ?
return (preg_match('/text-align.*?[center|justify|right]/i', (string)$block)) ?
$block :
$block . 'text-align:left;';
}