fputs() -> fwrite()

pull/6604/head
Aleksander Machniak 5 years ago
parent d392e2d72a
commit fe5b4fd81d

@ -34,7 +34,7 @@ function print_usage()
function _die($msg, $usage=false)
{
fputs(STDERR, $msg . "\n");
fwrite(STDERR, $msg . "\n");
if ($usage) print_usage();
exit(1);
}

@ -91,7 +91,8 @@ else {
$schema->disconnect();
if ($error && !$_SERVER['REMOTE_ADDR'])
fputs(STDERR, $error);
if ($error && !$_SERVER['REMOTE_ADDR']) {
fwrite(STDERR, $error);
}
?>

@ -97,7 +97,7 @@ else if (defined('JSON_PRETTY_PRINT')) {
echo json_encode($data, $flags);
}
else {
fputs(STDERR,
fwrite(STDERR,
"FAILED! composer.phar not found in current directory.
Please download it from http://getcomposer.org/download/ or with

@ -48,9 +48,9 @@ class rcube_smb_password
$cmd = $bin . ' -r ' . escapeshellarg($host) . ' -s -U "' . escapeshellarg($username) . '" > ' . $tmpfile . ' 2>&1';
$handle = @popen($cmd, 'w');
fputs($handle, $currpass."\n");
fputs($handle, $newpass."\n");
fputs($handle, $newpass."\n");
fwrite($handle, $currpass."\n");
fwrite($handle, $newpass."\n");
fwrite($handle, $newpass."\n");
@pclose($handle);
$res = file($tmpfile);
unlink($tmpfile);

@ -273,7 +273,7 @@ abstract class rcube_output
public function raise_error($code, $message)
{
// STUB: to be overloaded by specific output classes
fputs(STDERR, "Error $code: $message\n");
fwrite(STDERR, "Error $code: $message\n");
exit(-1);
}

Loading…
Cancel
Save