[php8-compat] Fix issue with returning bool from uasort by using the spaceship operator
[civicrm-core.git] / CRM / Utils / Check.php
index 1e4d9f7df707bee0cd99aa5e5944f0ea89299cd7..618b332b7b3f0fcdae40b76339a8c6babe4fc445 100644 (file)
@@ -64,7 +64,7 @@ class CRM_Utils_Check {
    * Display daily system status alerts (admin only).
    */
   public function showPeriodicAlerts() {
-    if (CRM_Core_Permission::check('administer CiviCRM')) {
+    if (CRM_Core_Permission::check('administer CiviCRM system')) {
       $session = CRM_Core_Session::singleton();
       if ($session->timer('check_' . __CLASS__, self::CHECK_TIMER)) {
 
@@ -114,7 +114,7 @@ class CRM_Utils_Check {
       return strcmp($a->getName(), $b->getName());
     }
     // The Message constructor guarantees that these will always be integers.
-    return ($aSeverity < $bSeverity);
+    return ($aSeverity <=> $bSeverity);
   }
 
   /**