mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-06-25 06:38:42 +02:00
parent
db42f2786c
commit
462c005f2c
1 changed files with 20 additions and 16 deletions
|
@ -175,6 +175,9 @@ function parse_mime_type($url)
|
||||||
'image' => 'image/*',
|
'image' => 'image/*',
|
||||||
'mp3' => 'audio/mpeg',
|
'mp3' => 'audio/mpeg',
|
||||||
];
|
];
|
||||||
|
// if-check to avoid excessive php errors about open_basedir restriction (#4502)
|
||||||
|
$open_basedir = ini_get('open_basedir');
|
||||||
|
if (! $open_basedir) {
|
||||||
// '@' is used to mute open_basedir warning, see issue #818
|
// '@' is used to mute open_basedir warning, see issue #818
|
||||||
if (@is_readable('/etc/mime.types')) {
|
if (@is_readable('/etc/mime.types')) {
|
||||||
$file = fopen('/etc/mime.types', 'r');
|
$file = fopen('/etc/mime.types', 'r');
|
||||||
|
@ -195,6 +198,7 @@ function parse_mime_type($url)
|
||||||
fclose($file);
|
fclose($file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (strpos($url, '?') !== false) {
|
if (strpos($url, '?') !== false) {
|
||||||
$url_temp = substr($url, 0, strpos($url, '?'));
|
$url_temp = substr($url, 0, strpos($url, '?'));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue