]> granicus.if.org Git - php/commitdiff
Bail out if JUNIT is not enabled
authorChristoph M. Becker <cmbecker69@gmx.de>
Mon, 7 Oct 2019 11:20:14 +0000 (13:20 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Mon, 7 Oct 2019 11:22:11 +0000 (13:22 +0200)
Otherwise we would try to access an array element of `false`, which
issues a notice as of PHP 7.4.0.  This would happen, for instance, for
bug63447_001.phpt if CGI is not available.

run-tests.php

index 909a8ea9b7b9f44450c0a2b6f5507bfb917455da..5adfcd2991581e1949d32ea04cf3fab2ff76868b 100755 (executable)
@@ -3504,6 +3504,8 @@ function junit_path_to_classname($file_name)
 {
        global $JUNIT;
 
+       if (!junit_enabled()) return '';
+
        $ret = $JUNIT['name'];
        $_tmp = array();