Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Trivial
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.6
-
Fix Version/s: 4.7.8
-
Component/s: CiviReport
-
Labels:
-
Documentation Required?:None
-
Funding Source:Core Team Funds
Description
Warning: strlen() expects parameter 1 to be string, array given in /<joomla root>/administrator/components/com_civicrm/civicrm/CRM/Report/Form.php on line 1894 when running a relationship report. Examination using a debugger shows this code:
default:
if ($value !== NULL && strlen($value) > 0) {
if (isset($field['clause'])) {
// FIXME: we not doing escape here. Better solution is to use two
// different types - data-type and filter-type
$clause = $field['clause'];
}
else {
$value = CRM_Utils_Type::escape($value, $type);
$sqlOP = $this->getSQLOperator($op);
if ($field['type'] == CRM_Utils_Type::T_STRING) {
$value = "'{$value}'";
}
$clause = "( {$field['dbAlias']} $sqlOP $value )";
}
}
break;
$value can be an array of integers. From the comments it looks as though this piece of code needs some attention. It may be that this is already happening.