Warning: trim() expects parameter 1 to be string, array given in E:\web\powerhouse\cms1\packages\sixeightdatadisplay\models\template.php on line 937

Permalink Browser Info Environment
Just updated a site from 2.7.1 to 2.7.1.4
Data display block, showing search results.
Warning: trim() expects parameter 1 to be string, array given in /packages/sixeightdatadisplay/models/template.php on line 937

template.php
} else {
  $answerValue = str_replace('&','&',$answerSet->getAnswer($question->ffID));
}
return trim($answerValue); // line 929

The error is cause by trying to trim an array of [aID, value]

answer_set.php
public function getAnswer($identifier) {
  $db = Loader::db();
  if(is_numeric($identifier)) {
    return $db->getRow("SELECT aID, value FROM sixeightformsAnswers WHERE asID=? AND ffID=?",array($this->asID,$identifier));
  } else {
    return $this->getAnswerByHandle($identifier);
  }
}

The query SELECT aID, value returns an array, not a scalar

Seems to be further issues with rendering of escaped html such a (amp)160;

I ran the same test on an old backup and the problem did not exist in version 2.7.1

Type: Discussion
Status: New
JohntheFish
View Replies:

concrete5 Environment Information

c5.6.3.3,
v2.7.1.4

Browser User-Agent String

Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.