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

Change to Settings code results in regression of CRM-19610

    Details

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

      Description

      In Civi\Core/SettingsBag::setDb is a line of code that checks whether the setting in question has an on_change callback.  It should only run a callback if the old value and new value of the setting aren't both null/zero.

      As part of CRM-18231, Monish Deb identified a problem.  The code was treating ANY strings as a zero.  However, in fixing it, they caused the string "0" to be evaluated as "non-zero".

      This reintroduced the same symptoms seen in CRM-19610, which was the bug that caused the "don't run a callback if old and new values are null/zero" code to be introduced.

       

      References:

      https://chat.civicrm.org/civicrm/pl/brdi48bko3rqxy87eefqcnrrwe

      https://civicrm.stackexchange.com/questions/21827/unable-to-update-search-preferences-after-upgrading-to-civicrm-4-7-28

        Attachments

          Activity

            People

            • Assignee:
              palantejon Jon K Goldberg
              Reporter:
              palantejon Jon K Goldberg
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: