projects
/
squirrelmail.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Even more checking whether writing actually succeeds.
[squirrelmail.git]
/
plugins
/
squirrelspell
/
modules
/
check_me.mod
diff --git
a/plugins/squirrelspell/modules/check_me.mod
b/plugins/squirrelspell/modules/check_me.mod
index d0594fd1d49e9670f8afa6a7e5e9021138e7cc71..d892f4a8818885a9ac6c2fb1d5233802df4d7c43 100644
(file)
--- a/
plugins/squirrelspell/modules/check_me.mod
+++ b/
plugins/squirrelspell/modules/check_me.mod
@@
-97,7
+97,10
@@
if( check_php_version ( 4, 3 ) ) {
error_box ( _("Could not run the spellchecker command (%s).",
htmlspecialchars($sqspell_command) ) , $color );
}
error_box ( _("Could not run the spellchecker command (%s).",
htmlspecialchars($sqspell_command) ) , $color );
}
- fwrite($pipes[0], $sqspell_new_text);
+ if ( ! @fwrite($pipes[0], $sqspell_new_text) ) {
+ error_box ( _("Error while writing to pipe.",
+ htmlspecialchars($floc) ) , $color );
+ }
fclose($pipes[0]);
$sqspell_output = array();
for($i=1; $i<=2; $i++) {
fclose($pipes[0]);
$sqspell_output = array();
for($i=1; $i<=2; $i++) {
@@
-116,7
+119,10
@@
if( check_php_version ( 4, 3 ) ) {
error_box ( _("Could not open temporary file '%s'.",
htmlspecialchars($floc) ) , $color );
}
error_box ( _("Could not open temporary file '%s'.",
htmlspecialchars($floc) ) , $color );
}
- fwrite($fp, $sqspell_new_text);
+ if ( ! @fwrite($fp, $sqspell_new_text) ) {
+ error_box ( _("Error while writing to temporary file '%s'.",
+ htmlspecialchars($floc) ) , $color );
+ }
fclose($fp);
exec("$sqspell_command < $floc 2>&1", $sqspell_output, $sqspell_exitcode);
unlink($floc);
fclose($fp);
exec("$sqspell_command < $floc 2>&1", $sqspell_output, $sqspell_exitcode);
unlink($floc);