From c11a6fccfe76152f1bf0e26bbe2af3cf81d91c34 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Fri, 26 Feb 2010 16:40:40 +0100 Subject: Added more check when opening a file --- includes/inc_streaminfo.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'includes/inc_streaminfo.php') diff --git a/includes/inc_streaminfo.php b/includes/inc_streaminfo.php index 5342573..576bd5d 100755 --- a/includes/inc_streaminfo.php +++ b/includes/inc_streaminfo.php @@ -28,11 +28,15 @@ function writeinfostream($type=0, $name="", $title="", $desc="", $mode="", $cate function readinfostream() { + + if (!file_exists("ram/streaminfo")) + return array(0, "", "", "", ""); + $infofile = fopen("ram/streaminfo", 'r'); if (!$infofile) return array(0, "", "", "", ""); - while ($line = fgets($infofile, 1024)) + while ($line = fgets($infofile, 1024)) { if (!strncmp($line, "type=", strlen("type="))) $type = substr($line, strlen("type="), -1); -- cgit v1.2.3