From efab0bad32ef1a09f2b65e6a28182881e48d6d66 Mon Sep 17 00:00:00 2001 From: Sarjuuk Date: Sun, 2 Jun 2024 01:23:42 +0200 Subject: [PATCH] Misc/Fixup * missed const from f77d676a19380d38ea161229f19a5680c092fad9 * missing start of string anchor in Util::checkNumeric --- includes/utilities.php | 2 +- localization/lang.class.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/utilities.php b/includes/utilities.php index 40e0a9ce..c19a68eb 100644 --- a/includes/utilities.php +++ b/includes/utilities.php @@ -996,7 +996,7 @@ abstract class Util } // is int string (is_numeric can only handle strings in base 10) - if (is_numeric($number) || preg_match('/0[xb]?\d+/', $number)) + if (is_numeric($number) || preg_match('/^0[xb]?\d+/', $number)) { $number = intVal($number, 0); // 'base 0' auto-detects base if ($typeCast == NUM_CAST_INT) diff --git a/localization/lang.class.php b/localization/lang.class.php index a935d771..81cb9be5 100644 --- a/localization/lang.class.php +++ b/localization/lang.class.php @@ -677,7 +677,7 @@ class Lang switch ($fmt) { case self::FMT_HTML: - return ''; + return ''; case self::FMT_MARKUP: return '[icon name='.Util::lower($iconName).']'; case self::FMT_RAW: