1
0
mirror of https://github.com/php/php-src.git synced 2026-03-26 09:12:14 +01:00

Return FALSE when file cannot be found.

Specify full paths to the files used for the test.
This commit is contained in:
Ilia Alshanetsky
2004-09-26 19:24:18 +00:00
parent d6501f756a
commit d5bac133ee
2 changed files with 3 additions and 2 deletions

View 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);
?>

View 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);