From b60aaaee635f80ddaece345120b410ae9aaa4b7f Mon Sep 17 00:00:00 2001 From: tuutti Date: Fri, 31 Mar 2023 08:58:22 +0300 Subject: [PATCH] Make sure haystack is a string --- azure-storage-common/src/Common/Internal/Utilities.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-storage-common/src/Common/Internal/Utilities.php b/azure-storage-common/src/Common/Internal/Utilities.php index 5765e4f5..0747d6ee 100644 --- a/azure-storage-common/src/Common/Internal/Utilities.php +++ b/azure-storage-common/src/Common/Internal/Utilities.php @@ -612,7 +612,7 @@ public static function endsWith($haystack, $needle, $ignoreCase = false) return true; } - return (substr($haystack, -$length) === $needle); + return (substr((string) $haystack, -$length) === $needle); } /**