mirror of
https://github.com/friendica/friendica
synced 2024-11-10 04:22:54 +00:00
Merge pull request #10321 from nupplaphil/bug/php7_compl
Downgrading PHP 7.4 incompatible fread/fwrite checks
This commit is contained in:
commit
119ec38c60
1 changed files with 2 additions and 2 deletions
|
@ -162,7 +162,7 @@ class HTTPInputData
|
|||
$lastLine = null;
|
||||
while (($chunk = fgets($stream, 8096)) !== false && strpos($chunk, $boundary) !== 0) {
|
||||
if ($lastLine !== null) {
|
||||
if (fwrite($fileHandle, $lastLine) === false) {
|
||||
if (!fwrite($fileHandle, $lastLine)) {
|
||||
$error = UPLOAD_ERR_CANT_WRITE;
|
||||
break;
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class HTTPInputData
|
|||
}
|
||||
|
||||
if ($lastLine !== null && $error !== UPLOAD_ERR_CANT_WRITE) {
|
||||
if (fwrite($fileHandle, rtrim($lastLine, "\r\n")) === false) {
|
||||
if (!fwrite($fileHandle, rtrim($lastLine, "\r\n"))) {
|
||||
$error = UPLOAD_ERR_CANT_WRITE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue