Skip to content

Commit 59b3ab8

Browse files
committed
Avoid some @count() suppressions in run-tests.php
1 parent 0aa09da commit 59b3ab8

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
}
@@ -2209,7 +2209,7 @@ function run_test($php, $file, $env)
22092209
$test_files[] = array($f, $file);
22102210
}
22112211
}
2212-
$test_cnt += @count($test_files) - 1;
2212+
$test_cnt += count($test_files) - 1;
22132213
$test_idx--;
22142214

22152215
show_redirect_start($IN_REDIRECT['TESTS'], $tested, $tested_file);
@@ -2243,7 +2243,7 @@ function run_test($php, $file, $env)
22432243
}
22442244
}
22452245

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

22482248
if (is_array($org_file)) {
22492249
$file = $org_file[0];

0 commit comments

Comments
 (0)