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

Drupal8 All menus under 'Reports' gives php warning stating Warning: Illegal offset type in CRM_Report_Form_Instance::buildForm() (line 138 of /Users/vasanthakaje/Sites/devdesktop/drupal819/libraries/civicrm/CRM/Report/Form/Instance.php). => Array

    Details

    • Type: Bug
    • Status: In Progress
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.7.10
    • Fix Version/s: None
    • Component/s: None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      All menus under 'Reports' gives php warning stating

      Warning: Illegal offset type in CRM_Report_Form_Instance::buildForm() (line 138 of /Users/vasanthakaje/Sites/devdesktop/drupal819/libraries/civicrm/CRM/Report/Form/Instance.php). => Array

      In Drupal 7 $user_roles_array used to be an array with values as
      [integer => 'string']

      In Drupal 8, $user_roles_array is changed to an array with values as
      ['string' => array]

      Hence trying to store value using $value (thinking it is a string) is causing issue. Changed it to $key and it works fine.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              VasanthaKaje Vasantha Kaje
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: