Commit 9e75056488d for php.net
commit 9e75056488d9d90bdb2a9ef053a8a1f6934e8dcd
Author: Weilin Du <weilindu@php.net>
Date: Sun Sep 20 02:12:46 2026 +0800
CI: fix ext/zend_test/tests/zend_mm_custom_handlers_alloc_01.phpt (#23775)
After 93fd714, we just return the copy of the string when the mult
parameter of str_repeat is 1, that is to repeat the string 1 time. But
this cause inconsistency in this test. When the rand number is 1, it
won't allocate any byte. So the test will fail.
diff --git a/ext/zend_test/tests/zend_mm_custom_handlers_alloc_01.phpt b/ext/zend_test/tests/zend_mm_custom_handlers_alloc_01.phpt
index cb6490d4c5d..b305e260e3f 100644
--- a/ext/zend_test/tests/zend_mm_custom_handlers_alloc_01.phpt
+++ b/ext/zend_test/tests/zend_mm_custom_handlers_alloc_01.phpt
@@ -5,7 +5,7 @@
--FILE--
<?php
ini_set('zend_test.zend_mm_custom_handlers.enabled', 1);
-$string = str_repeat('String', rand(1,100));
+$string = str_repeat('String', rand(2,100));
ini_set('zend_test.zend_mm_custom_handlers.enabled', 0);
?>
--EXPECTREGEX--
diff --git a/ext/zend_test/tests/zend_mm_custom_handlers_free_01.phpt b/ext/zend_test/tests/zend_mm_custom_handlers_free_01.phpt
index ae9dacb9995..497cd7aee21 100644
--- a/ext/zend_test/tests/zend_mm_custom_handlers_free_01.phpt
+++ b/ext/zend_test/tests/zend_mm_custom_handlers_free_01.phpt
@@ -4,7 +4,7 @@
zend_test
--FILE--
<?php
-$string = str_repeat('String', rand(1,100));
+$string = str_repeat('String', rand(2,100));
ini_set('zend_test.zend_mm_custom_handlers.enabled', 1);
unset($string);
ini_set('zend_test.zend_mm_custom_handlers.enabled', 0);