]> granicus.if.org Git - php/commitdiff
- Section FILE does not exist for redirection tests
authorMarcus Boerger <helly@php.net>
Fri, 9 Dec 2005 09:49:58 +0000 (09:49 +0000)
committerMarcus Boerger <helly@php.net>
Fri, 9 Dec 2005 09:49:58 +0000 (09:49 +0000)
run-tests.php

index e73d858aeeb260b9dd7fd3600846b84535aa7159..3b552492b11d12faa07409b43bb7c5bc5cf03877 100755 (executable)
@@ -987,7 +987,9 @@ TEST $file
                if (!is_dir(dirname($copy_file))) {
                        @mkdir(dirname($copy_file), 0777, true) or error("Cannot create output directory - " . dirname($copy_file));
                }
-               save_text($copy_file, $section_text['FILE']);
+               if (isset($section_text['FILE'])) {
+                       save_text($copy_file, $section_text['FILE']);
+               }
                $temp_filenames = array(
                        'file' => $copy_file,
                        'diff' => $diff_filename, 
@@ -1697,7 +1699,7 @@ function show_result($result, $tested, $tested_file, $extra = '', $temp_filename
 
        if ($html_output)
        {
-               if (isset($temp_filenames['file'])) {
+               if (isset($temp_filenames['file']) && @file_exists($temp_filenames['file'])) {
                        $url = str_replace($temp_target, $temp_urlbase, $temp_filenames['file']);
                        $tested = "<a href='$url'>$tested</a>";
                }