[REF] don't handle non-array, pass by reference
authoreileen <emcnaughton@wikimedia.org>
Mon, 7 Oct 2019 04:57:29 +0000 (06:57 +0200)
committereileen <emcnaughton@wikimedia.org>
Mon, 7 Oct 2019 04:57:29 +0000 (06:57 +0200)
This is only called from one place & it is definitely coming in as an array & using the return values.

CRM/Contact/Form/Search/Advanced.php

index 0fcb3e73641045739a08c4d89cd7ab2f0db4a805..a3f46e68de23c863c65d0926baf6c35ba2b50314 100644 (file)
@@ -386,10 +386,7 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search {
    *
    * @return array
    */
-  public function normalizeDefaultValues(&$defaults) {
-    if (!is_array($defaults)) {
-      $defaults = array();
-    }
+  public function normalizeDefaultValues($defaults) {
     $this->loadDefaultCountryBasedOnState($defaults);
     if ($this->_ssID && empty($_POST)) {
       $defaults = array_merge($defaults, CRM_Contact_BAO_SavedSearch::getFormValues($this->_ssID));