fix: do not error out when disk_check_exclude.txt does not exist yet
This commit is contained in:
@@ -465,6 +465,8 @@ if(isset($_GET['species'])){ ?>
|
|||||||
$fp = @fopen($home."/BirdNET-Pi/scripts/disk_check_exclude.txt", 'r');
|
$fp = @fopen($home."/BirdNET-Pi/scripts/disk_check_exclude.txt", 'r');
|
||||||
if ($fp) {
|
if ($fp) {
|
||||||
$disk_check_exclude_arr = explode("\n", fread($fp, filesize($home."/BirdNET-Pi/scripts/disk_check_exclude.txt")));
|
$disk_check_exclude_arr = explode("\n", fread($fp, filesize($home."/BirdNET-Pi/scripts/disk_check_exclude.txt")));
|
||||||
|
} else {
|
||||||
|
$disk_check_exclude_arr = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = $_GET['species'];
|
$name = $_GET['species'];
|
||||||
|
|||||||
Reference in New Issue
Block a user