summaryrefslogtreecommitdiffstats
path: root/event-php81.patch
blob: f4144a1c10505adff6fba82b92be1f3288418989 (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
From d4bf4d70181dea17985af1bd52748b0f678a4b8c Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Fri, 11 Jun 2021 12:56:43 +0200
Subject: [PATCH] Fix deprecated: strlen(): Passing null to parameter...

---
 tests/29-buffer-pullup.phpt | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/29-buffer-pullup.phpt b/tests/29-buffer-pullup.phpt
index b62b440..32bae4a 100644
--- a/tests/29-buffer-pullup.phpt
+++ b/tests/29-buffer-pullup.phpt
@@ -14,7 +14,12 @@ foreach ($a as $s) {
 	$b = new $eventBuffereClass();
 	$b->add($s);
 	$s_pullup = $b->pullup(-1);
-	var_dump(strlen($s_pullup) == strlen($s) && $s_pullup == $s);
+	if (is_null($s_pullup)) {
+		// pullup return null when no data availble+
+		var_dump(empty($s));
+	} else {
+		var_dump(strlen($s_pullup) == strlen($s) && $s_pullup == $s);
+	}
 }
 ?>
 --EXPECT--
-- 
2.31.1