Module: tools Branch: master Commit: 694e6f4e9812b5df1ec9193be32b6d7fcb835db9 URL: https://source.winehq.org/git/tools.git/?a=commit;h=694e6f4e9812b5df1ec9193b...
Author: Francois Gouget fgouget@codeweavers.com Date: Wed Feb 10 16:36:17 2021 +0100
testbot/web: Fix the $Task->TestFailures check.
If it has not been set to a numeric value, $Task->TestFailures is undefined so comparing it to an empty string makes no sense. Fortunately undef ne "" is false (as well as undef eq "") so the code was doing the right thing and was not generating a warning since warnings are not turned on.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/web/index.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/web/index.pl b/testbot/web/index.pl index 088aea1..2486229 100644 --- a/testbot/web/index.pl +++ b/testbot/web/index.pl @@ -131,7 +131,7 @@ sub GenerateDataCell($$$$) foreach my $Task (@{$Step->Tasks->GetItems()}) { my $TaskFailures = $Task->TestFailures; - if ($TaskFailures ne "") + if (defined $TaskFailures) { $HasTestResult = 1; $Failures += $TaskFailures;