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:
@@ -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 "[]";
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user