Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-18457

Error on line 1894 ..administrator/components/com_civicrm/civicrm/CRM/Report/Form.php

    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
    • 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.

        Attachments

          Activity

            People

            • Assignee:
              jitendra.purohit Jitendra Purohit
              Reporter:
              spalmstr Stephen Palmstrom
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m