com web/php: check if it exists before trying to open it: include/shared-manual.inc
| From: | Paul Dragoonis | Date: | Wed, 06 Jul 2011 11:27:32 +0000 |
| Subject: | com web/php: check if it exists before trying to open it: include/shared-manual.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-23511@lists.php.net to get a copy of this message | ||
Commit: 3a5b78f06ff0a8df5e419cf01a38368e3711bf2e
Author: Hannes Magnusson <bjori@php.net> Wed, 6 Jul 2011 11:27:32 +0000
Parents: 4cbf64cf9becf959bac8d4a2a06b8e16c1fc0c2d
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=3a5b78f06ff0a8df5e419cf01a38368e3711bf2e
Log:
check if it exists before trying to open it
Changed paths:
M include/shared-manual.inc
Diff:
diff --git a/include/shared-manual.inc b/include/shared-manual.inc
index dfa66a9..71a0639 100644
--- a/include/shared-manual.inc
+++ b/include/shared-manual.inc
@@ -428,6 +428,10 @@ function manual_notes_load($id)
substr($hash, 0, 2) . "/$hash";
// Open the note file for reading and get the data (12KB)
+ // ..if it exists
+ if (!file_exists($notes_file)) {
+ return $notes;
+ }
if ($fp = @fopen($notes_file, "r")) {
while (!feof($fp)) {
$line = chop(fgets($fp, 12288));