Fixed PHP compatibility issues

This commit is contained in:
Andreas Österreicher
2018-06-26 18:10:21 +02:00
parent dbb420bcac
commit 2fed75f175
7 changed files with 34 additions and 29 deletions
+2 -2
View File
@@ -196,13 +196,13 @@ class PhrasesLib
for ($i = 0; $i < count($this->_phrases); $i++)
{
$_phrase = $this->_phrases[$i]; // single phrase
$trimed = trim($_phrase->text);
// If the single phrase match the given parameters and is not an empty string
if ($_phrase->category == $category
&& $_phrase->phrase == $phrase
&& $_phrase->orgeinheit_kurzbz == $orgeinheit_kurzbz
&& $_phrase->orgform_kurzbz == $orgform_kurzbz
&& (!empty(trim($_phrase->text))))
&& (!empty($trimed)))
{
if (!is_array($parameters)) $parameters = array(); // if params is not an array