]> granicus.if.org Git - php/commitdiff
MFH:
authorIlia Alshanetsky <iliaa@php.net>
Sun, 26 Sep 2004 19:24:20 +0000 (19:24 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Sun, 26 Sep 2004 19:24:20 +0000 (19:24 +0000)
Return FALSE when file cannot be found.
Specify full paths to the files used for the test.

ext/tidy/tests/016.phpt
ext/tidy/tidy.c

index 660b85e3373490c85f9a7785992d91fa4e9e463a..f4f0752601828244be4140c2c8c94f70a30900c8 100644 (file)
@@ -4,7 +4,8 @@ Passing configuration file through tidy_parse_file()
 <?php if (!extension_loaded("tidy")) print "skip"; ?>
 --FILE--
 <?php
-        $tidy = tidy_parse_file("ext/tidy/tests/016.html", "ext/tidy/tests/016.tcfg");
+       $path = dirname(__FILE__);
+        $tidy = tidy_parse_file("{$path}/016.html", "{$path}/016.tcfg");
        tidy_clean_repair($tidy);
         echo tidy_get_output($tidy);
 ?>
index a64d7c6444d975ae6c74eee06a565de01dad7bb6..7a87300a7e93c73d109331bf1d2e3c59d4f3d6cf 100644 (file)
@@ -1088,7 +1088,7 @@ PHP_FUNCTION(tidy_parse_file)
 
        if (!(contents = php_tidy_file_to_mem(inputfile, use_include_path TSRMLS_CC))) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot Load '%s' into memory %s", inputfile, (use_include_path) ? "(Using include path)" : "");
-               return;
+               RETURN_FALSE;
        }
 
        TIDY_APPLY_CONFIG_ZVAL(obj->ptdoc->doc, options);