blob: dea1e8e79fd35bac069be34fa47770b09959ece9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
From b49ba663707bfc6d84ab2ffca1dbfdb31ef2de2d Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Thu, 4 Sep 2025 11:13:02 +0200
Subject: [PATCH] Fix Deprecated: Increment on non-numeric string is deprecated
(8.5)
---
tests/StrictTreeMap/rebalance_insert.phpt | 4 ++--
tests/StrictTreeSet/rebalance_add.phpt | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/StrictTreeMap/rebalance_insert.phpt b/tests/StrictTreeMap/rebalance_insert.phpt
index 3b94abf..e9acb17 100644
--- a/tests/StrictTreeMap/rebalance_insert.phpt
+++ b/tests/StrictTreeMap/rebalance_insert.phpt
@@ -3,8 +3,8 @@ Teds\StrictTreeMap rebalances
--FILE--
<?php
$it = new Teds\StrictTreeMap();
-for ($i = 'aa'; $i < 'ak'; $i++) {
- $it[$i] = true;
+for ($i = 0; $i < 10; $i++) {
+ $it['a' . chr(ord('a')+$i)] = true;
}
echo json_encode($it->debugGetTreeRepresentation(), JSON_PRETTY_PRINT), "\n";
var_dump($it);
diff --git a/tests/StrictTreeSet/rebalance_add.phpt b/tests/StrictTreeSet/rebalance_add.phpt
index e661a6a..cf612e0 100644
--- a/tests/StrictTreeSet/rebalance_add.phpt
+++ b/tests/StrictTreeSet/rebalance_add.phpt
@@ -3,8 +3,8 @@ Teds\StrictTreeSet rebalances
--FILE--
<?php
$it = new Teds\StrictTreeSet();
-for ($i = 'aa'; $i < 'ak'; $i++) {
- $it->add($i);
+for ($i = 0; $i < 10; $i++) {
+ $it->add('a' . chr(ord('a')+$i));
}
echo json_encode($it->debugGetTreeRepresentation(), JSON_PRETTY_PRINT), "\n";
var_dump($it);
@@ -82,4 +82,4 @@ object(Teds\StrictTreeSet)#1 (10) {
string(2) "ai"
[9]=>
string(2) "aj"
-}
\ No newline at end of file
+}
--
2.51.0
|