X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=plugins%2Fsquirrelspell%2Fmodules%2Fcheck_me.mod;h=d892f4a8818885a9ac6c2fb1d5233802df4d7c43;hp=d0594fd1d49e9670f8afa6a7e5e9021138e7cc71;hb=2fd96e6b1e3f337189d7a1a9561f1e8e2d1204c9;hpb=40c2e0282646148f7032a12e16a3c238abe2e109;ds=sidebyside diff --git a/plugins/squirrelspell/modules/check_me.mod b/plugins/squirrelspell/modules/check_me.mod index d0594fd1..d892f4a8 100644 --- 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 ); } - 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++) { @@ -116,7 +119,10 @@ if( check_php_version ( 4, 3 ) ) { 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);