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

@@ -1453,7 +1453,7 @@ class DomNode implements IQuery {
* @return bool
*/
function hasClass($className) {
return ($className && preg_match('`\b'.preg_quote($className).'\b`si', $this->class));
return ($className && preg_match('`\b'.preg_quote($className).'\b`si', (string)$this->class));
}
/**
@@ -1466,11 +1466,11 @@ class DomNode implements IQuery {
}
$class = $this->class;
foreach ($className as $c) {
if (!(preg_match('`\b'.preg_quote($c).'\b`si', $class) > 0)) {
if (!(preg_match('`\b'.preg_quote($c).'\b`si', (string)$class) > 0)) {
$class .= ' '.$c;
}
}
$this->class = trim($class);
$this->class = trim((string)$class);
}
/**