Commit:    497f21b6fb243f5708b52655f1d2ae85d4f28cc4
Author:    Stewart Lord <[email protected]>         Sat, 1 Jan 2011 20:49:54 
+0000
Parents:   5df2d2bb65d84fe78bb773624c21c2f90d326e37
Branches:  master

Link:       
http://git.php.net/?p=web/php.git;a=commitdiff;h=497f21b6fb243f5708b52655f1d2ae85d4f28cc4

Log:
Search index is now served as an empty array "[]" if generated json search
index files can't be found.

Changed paths:
  M  search-index.php


Diff:
diff --git a/search-index.php b/search-index.php
index ab53c64..da0cefe 100644
--- a/search-index.php
+++ b/search-index.php
@@ -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 "[]";
+}
+


--
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to