1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

Search index is now served as an empty array "[]" if generated json search

index files can't be found.
This commit is contained in:
Stewart Lord
2011-01-01 20:49:54 +00:00
parent afd9bcbb44
commit e887fd8959

View File

@@ -18,5 +18,11 @@ header("Content-Type: application/javascript");
ob_start("ob_gzhandler");
echo "$varname = ";
readfile(dirname(__FILE__) . "/manual/$langcode/$filename.json");
$file = dirname(__FILE__) . "/manual/$langcode/$filename.json";
if (is_readable($file)) {
readfile($file);
} else {
echo "[]";
}