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

Possible NULL/'null' error in SavedSearch BAO

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.4
    • Fix Version/s: 4.7
    • Component/s: Core CiviCRM
    • Labels:
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      While trying to create a fix for CRM-16701, I think I might have stumbled upon a small error in https://github.com/civicrm/civicrm-core/blob/master/CRM/Contact/BAO/SavedSearch.php#L299

      The code says:

          if (isset($params['formValues']) &&
            !empty($params['formValues'])
          ) {
            $savedSearch->form_values = serialize($params['formValues']);
          }
          else {
            $savedSearch->form_values = 'null';
          }

      I think that last line should be:

      $savedSearch->form_values = NULL;

      I tried to git blame that line (maybe there was something useful in the commit message), but this line has been there since the initial commit.

        Attachments

          Activity

            People

            • Assignee:
              jitendra.purohit Jitendra Purohit
              Reporter:
              johanv Johan Vervloet
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: