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

Make setting bug more explicit

    Details

    • Type: Improvement
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.7.23
    • Fix Version/s: 4.7.23
    • Component/s: Core CiviCRM
    • Labels:
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Contributed Code
    • Verified?:
      No

      Description

      This is a very minor code improvement. The function

      BAO_Setting::validateSetting(&$value, $fieldSpec) {

      requires $fieldSpec be an array & givesĀ a confusing error if it is not. I propose adding variable typing to make it clearer

      BAO_Setting::validateSetting(&$value, array $fieldSpec) {

      Error:
      23:09:34 CiviCRM_API3_Exception: Illegal string offset 'type'

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              eileen Eileen McNaughton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: