]> git.mxchange.org Git - friendica.git/blobdiff - src/Util/HTTPInputData.php
Tests ...
[friendica.git] / src / Util / HTTPInputData.php
index 490dda5f66ab9756747ad3e6e736ca746faaf86f..d22c3894d40d0bff9552c2b18e384c6130a2e0fc 100644 (file)
@@ -132,7 +132,7 @@ class HTTPInputData
                $filename = $matches[4] ?? '';
 
                if (!empty($filename)) {
-                       $files[$name] = self::fetchFileData($stream, $boundary, $headers, $filename);
+                       $files[$name] = static::fetchFileData($stream, $boundary, $headers, $filename);
                        return ['variables' => $variables, 'files' => $files];
                } else {
                        $variables = self::fetchVariables($stream, $boundary, $headers, $name, $variables);
@@ -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;
                                }
                        }