From d5df3588afd4a854a858df1f68be65e15e6804f2 Mon Sep 17 00:00:00 2001 From: Torben Dannhauer Date: Fri, 29 May 2026 07:39:04 +0200 Subject: [PATCH 1/2] Fix random ID generation to cast mt_rand to string --- src/V3/ImageVariable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/V3/ImageVariable.php b/src/V3/ImageVariable.php index cafa991..13812df 100644 --- a/src/V3/ImageVariable.php +++ b/src/V3/ImageVariable.php @@ -458,7 +458,7 @@ public function loadImageData($image) public function getRandomId() { if (!isset($this->_random)) { - $this->_random = uniqid(mt_rand()); + $this->_random = uniqid((string)mt_rand()); } return $this->_random; From d3f664ce44fe2f5c0b12d85e5aea3d5243080306 Mon Sep 17 00:00:00 2001 From: Torben Dannhauer Date: Fri, 29 May 2026 07:39:47 +0200 Subject: [PATCH 2/2] Cast mt_rand() to string for uniqid() --- lib/Horde/Form/Type.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Horde/Form/Type.php b/lib/Horde/Form/Type.php index b63c65b..3175d1d 100644 --- a/lib/Horde/Form/Type.php +++ b/lib/Horde/Form/Type.php @@ -1570,7 +1570,7 @@ public function loadImageData($image) public function getRandomId() { if (!isset($this->_random)) { - $this->_random = uniqid(mt_rand()); + $this->_random = uniqid((string)mt_rand()); } return $this->_random; }