• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#objective-cqt誰得cocoawindowspythonphprubygameguibathyscaphec翻訳omegat計画中(planning stage)frameworktwittertestdombtronvb.netdirectxarduinopreviewerゲームエンジン

Commit MetaInfo

Revisiónac35a3db3bda572427aa0491e1e7416c41feba37 (tree)
Tiempo2021-12-14 23:37:09
Autorumorigu <umorigu@gmai...>
Commiterumorigu

Log Message

BugTrack/2514 PHP8: Avoid error on fread($fp, 0)

Cambiar Resumen

Diferencia incremental

--- a/plugin/dump.inc.php
+++ b/plugin/dump.inc.php
@@ -462,7 +462,12 @@ class tarlib
462462 // ファイルデータの取得
463463 $fpr = @fopen($name , 'rb');
464464 flock($fpr, LOCK_SH);
465- $data = fread($fpr, $size);
465+ if ($size === 0) {
466+ // Avoid error on fread($fp, 0);
467+ $data = '';
468+ } else {
469+ $data = fread($fpr, $size);
470+ }
466471 flock($fpr, LOCK_UN);
467472 fclose( $fpr );
468473