summaryrefslogtreecommitdiffstats
path: root/d6f1583ffd408a9bbf1566d49c2bf099fce4e53a.patch
blob: 5f7a10bed65fb94c804b9f8fed9c376132d25ced (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From d6f1583ffd408a9bbf1566d49c2bf099fce4e53a Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@php.net>
Date: Mon, 24 Aug 2020 09:58:55 +0200
Subject: [PATCH] avoid "Undefined array key 1" with PHP 8

---
 tests/parse_test_messages.phpt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/parse_test_messages.phpt b/tests/parse_test_messages.phpt
index 49573e4..df98741 100644
--- a/tests/parse_test_messages.phpt
+++ b/tests/parse_test_messages.phpt
@@ -17,7 +17,7 @@ $dir = opendir($testdir) or die("unable to open test dir!");
 $messages = array();
 
 while (($f = readdir($dir)) !== false) {
-	if ($f == "CVS" || $f == "." || $f == "..")
+	if ($f == "CVS" || $f == "." || $f == ".." || !strpos($f, '.'))
 		continue;
 		
 	list($name, $suffix) = explode(".", $f, 2);