Skip to content

Commit 21cdd0a

Browse files
Merge pull request #18 from dutchenkoOleg/master
attrTextValue
2 parents c554dd6 + 3001498 commit 21cdd0a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/WezomAgency/R2D2.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,14 @@ public function resourceContent($path)
120120

121121

122122
/**
123-
* @param string $value
123+
* @param $value
124124
* @return string
125125
*/
126126
public function attrTextValue($value)
127127
{
128+
if (!is_string($value)) {
129+
return '';
130+
}
128131
$text = strip_tags(preg_replace('/<br>/', ' ', $value));
129132
return htmlspecialchars($text, ENT_QUOTES, 'UTF-8', false);
130133
}

0 commit comments

Comments
 (0)