diff --git a/CRM/Mailing/Page/Browse.php b/CRM/Mailing/Page/Browse.php index eca527d5dce7..6fd93bdfa024 100644 --- a/CRM/Mailing/Page/Browse.php +++ b/CRM/Mailing/Page/Browse.php @@ -105,13 +105,13 @@ public function preProcess() { if (CRM_Core_Permission::check('access CiviMail')) { $archiveLinks = TRUE; } - if ($archiveLinks == TRUE) { - $this->assign('archiveLinks', $archiveLinks); - } + $this->assign('archiveLinks', $archiveLinks ?? FALSE); } /** * Run this page (figure out the action needed and perform it). + * + * @throws \CRM_Core_Exception */ public function run() { $this->preProcess(); @@ -122,19 +122,19 @@ public function run() { = 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)) { + if (strtolower($this->_sortByCharacter ?: '') === 'all' || !empty($_POST)) { $this->_sortByCharacter = NULL; $this->set('sortByCharacter', NULL); } - if (($newArgs[3] ?? NULL) == 'unscheduled') { + if (($newArgs[3] ?? NULL) === 'unscheduled') { $this->_unscheduled = TRUE; } $this->set('unscheduled', $this->_unscheduled); $this->set('archived', $this->isArchived($newArgs)); - if (($newArgs[3] ?? NULL) == 'scheduled') { + if (($newArgs[3] ?? NULL) === 'scheduled') { $this->_scheduled = TRUE; } $this->set('scheduled', $this->_scheduled); @@ -243,7 +243,7 @@ public function run() { if ($this->get('sms')) { $urlParams .= '&sms=1'; } - if (($newArgs[3] ?? NULL) == 'unscheduled') { + if (($newArgs[3] ?? NULL) === 'unscheduled') { $urlString .= '/unscheduled'; $urlParams .= '&scheduled=false'; $this->assign('unscheduled', TRUE);