1
0
mirror of https://github.com/vichan-devel/vichan.git synced 2024-11-23 23:20:57 +01:00

fix issues with the banner script not working

PHP 7.4
Notice: Trying to access array offset on value of type resource in on line 13

Notice: Trying to access array offset on value of type resource in on line 14

Notice: fpassthru(): read of 8192 bytes failed with errno=21 Is a directory in  on line 17
This commit is contained in:
RealAngeleno 2023-02-27 14:32:28 -08:00 committed by Fredrick Brennan
parent a69337e243
commit f631b83fb1

5
b.php
View File

@ -10,8 +10,9 @@ $fp = fopen($dir . $name, 'rb');
header('Cache-Control: no-cache, no-store, must-revalidate'); // HTTP 1.1
header('Pragma: no-cache'); // HTTP 1.0
header('Expires: 0'); // Proxies
header('Content-Type: ' . $fp['type']);
header('Content-Length: ' . $fp['bytes']);
$fstat = fstat($fp);
header('Content-Type: ' . mime_content_type($dir . $name));
header('Content-Length: ' . $fstat['size']);
// dump the picture and stop the script
fpassthru($fp);