comparison program/lib/Roundcube/rcube_utils.php @ 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 303b85d5b561
comparison
equal deleted inserted replaced
20:4aec5e272733 21:73124dd49283
663 else { 663 else {
664 $key = 'HTTP_' . strtoupper(strtr($name, '-', '_')); 664 $key = 'HTTP_' . strtoupper(strtr($name, '-', '_'));
665 $hdrs = array_change_key_case($_SERVER, CASE_UPPER); 665 $hdrs = array_change_key_case($_SERVER, CASE_UPPER);
666 } 666 }
667 667
668 return $hdrs[$key]; 668 return ($hdrs[$key]??null);
669 } 669 }
670 670
671 /** 671 /**
672 * Explode quoted string 672 * Explode quoted string
673 * 673 *
1086 * 1086 *
1087 * @param string $str Input value 1087 * @param string $str Input value
1088 * 1088 *
1089 * @return boolean Boolean value 1089 * @return boolean Boolean value
1090 */ 1090 */
1091 public static function get_boolean($str) 1091 public static function get_boolean($str = '')
1092 { 1092 {
1093 $str = strtolower($str); 1093 if (empty($str)) return false;
1094 1094 $str = strtolower($str);
1095 return !in_array($str, array('false', '0', 'no', 'off', 'nein', ''), true); 1095
1096 return !in_array($str, array('false', '0', 'no', 'off', 'nein'), true);
1096 } 1097 }
1097 1098
1098 /** 1099 /**
1099 * OS-dependent absolute path detection 1100 * OS-dependent absolute path detection
1100 */ 1101 */