Skip to content

Commit 85ea04b

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Avoid some @count() suppressions in run-tests.php
2 parents 06e193b + 59b3ab8 commit 85ea04b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

run-tests.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1860,7 +1860,7 @@ function run_test($php, $file, $env)
18601860

18611861
} else {
18621862

1863-
if (!isset($section_text['PHPDBG']) && @count($section_text['FILE']) + @count($section_text['FILEEOF']) + @count($section_text['FILE_EXTERNAL']) != 1) {
1863+
if (!isset($section_text['PHPDBG']) && isset($section_text['FILE']) + isset($section_text['FILEEOF']) + isset($section_text['FILE_EXTERNAL']) != 1) {
18641864
$bork_info = "missing section --FILE--";
18651865
}
18661866

@@ -1885,7 +1885,7 @@ function run_test($php, $file, $env)
18851885
}
18861886
}
18871887

1888-
if ((@count($section_text['EXPECT']) + @count($section_text['EXPECTF']) + @count($section_text['EXPECTREGEX'])) != 1) {
1888+
if ((isset($section_text['EXPECT']) + isset($section_text['EXPECTF']) + isset($section_text['EXPECTREGEX'])) != 1) {
18891889
$bork_info = "missing section --EXPECT--, --EXPECTF-- or --EXPECTREGEX--";
18901890
}
18911891
}
@@ -2216,7 +2216,7 @@ function run_test($php, $file, $env)
22162216
$test_files[] = array($f, $file);
22172217
}
22182218
}
2219-
$test_cnt += @count($test_files) - 1;
2219+
$test_cnt += count($test_files) - 1;
22202220
$test_idx--;
22212221

22222222
show_redirect_start($IN_REDIRECT['TESTS'], $tested, $tested_file);
@@ -2250,7 +2250,7 @@ function run_test($php, $file, $env)
22502250
}
22512251
}
22522252

2253-
if (is_array($org_file) || @count($section_text['REDIRECTTEST']) == 1) {
2253+
if (is_array($org_file) || isset($section_text['REDIRECTTEST'])) {
22542254

22552255
if (is_array($org_file)) {
22562256
$file = $org_file[0];

0 commit comments

Comments
 (0)