civicrm/mailing/browse/* - Fix warning
authorTim Otten <totten@civicrm.org>
Fri, 23 Jun 2023 18:41:14 +0000 (11:41 -0700)
committerTim Otten <totten@civicrm.org>
Fri, 23 Jun 2023 18:41:14 +0000 (11:41 -0700)
CRM/Mailing/Page/Browse.php

index 501e56e1736fbf2cca3a7e77e7244a3d9ff47cd4..9b938b032877926332a9bdb5d4d6f00a611af9f0 100644 (file)
@@ -130,8 +130,8 @@ class CRM_Mailing_Page_Browse extends CRM_Core_Page {
     $this->_sortByCharacter
       = CRM_Utils_Request::retrieve('sortByCharacter', 'String', $this);
 
-    // CRM-11920 all should set sortByCharacter to null, not empty string
-    if (strtolower($this->_sortByCharacter) == 'all' || !empty($_POST)) {
+    // CRM-11920 "all" should set sortByCharacter to null, not empty string
+    if (strtolower($this->_sortByCharacter ?: '') == 'all' || !empty($_POST)) {
       $this->_sortByCharacter = NULL;
       $this->set('sortByCharacter', NULL);
     }