diff program/steps/addressbook/func.inc @ 21:73124dd49283

More cleaning up php8 Warnings/deprecations, noticed that setting non-my-Dates mailboxes to sort on Date isn't sticky over ctrl-R
author Charlie Root
date Thu, 09 Oct 2025 11:31:41 -0400
parents 4681f974d28b
children
line wrap: on
line diff
--- a/program/steps/addressbook/func.inc	Wed Oct 08 09:42:21 2025 -0400
+++ b/program/steps/addressbook/func.inc	Thu Oct 09 11:31:41 2025 -0400
@@ -101,7 +101,7 @@
 }
 
 // remove undo information...
-if ($undo = $_SESSION['contact_undo']) {
+if ($undo = ($_SESSION['contact_undo']??null)) {
     // ...after timeout
     $undo_time = $RCMAIL->config->get('undo_timeout', 0);
     if ($undo['ts'] < time() - $undo_time)
@@ -945,7 +945,8 @@
         return $cid;
     }
 
-    if (!preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid)) {
+    if (!preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/',
+		    ($cid??''))) {
         return array();
     }