[jonah] file closing error
Sameh Ghane
sw@anthologeek.net
Thu Oct 24 02:53:39 2002
---------------------- multipart/mixed attachment
Hi Guys,
Here is a small patch to escape PHP warnings when attempting to fclose() a
handle that wasn't properly fopen()ed.
Cheers,
--
Sameh
---------------------- multipart/mixed attachment
Index: Jonah.php
===================================================================
RCS file: /repository/jonah/lib/Jonah.php,v
retrieving revision 1.14
diff -b -u -r1.14 Jonah.php
--- Jonah.php 2 Oct 2002 02:01:28 -0000 1.14
+++ Jonah.php 24 Oct 2002 01:50:48 -0000
@@ -229,7 +229,9 @@
echo '<font color="red">' . _("error: write to quote ") . $tickerSymbol . _(" cache file failed.") . '</font><br>';
}
+ if (is_resource($fp)) {
fclose($fp);
+ }
flush();
}
}
@@ -424,7 +426,9 @@
$html .= '<font color="red">' . _("error: write to weather cache file failed.") . '</font><br>';
}
+ if (is_resource($fp)) {
fclose($fp);
+ }
flush();
}
---------------------- multipart/mixed attachment--