From d6420501bc777be979d89171e7ed131273d97c58 Mon Sep 17 00:00:00 2001 From: TheTroll Date: Thu, 1 Apr 2010 15:03:36 +0200 Subject: Error handling --- bin/streaminfo.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'bin/streaminfo.php') diff --git a/bin/streaminfo.php b/bin/streaminfo.php index 8b935ef..130d0f9 100644 --- a/bin/streaminfo.php +++ b/bin/streaminfo.php @@ -15,7 +15,9 @@ function writeinfostream($session, $type, $mode, $url, $channame) $ram = "../ram/" .$session ."/"; - $infofile = fopen($ram ."streaminfo", 'w'); + $infofile = @fopen($ram ."streaminfo", 'w'); + if (!$infofile) + return; fwrite($infofile, "type=" .$type ."\n"); fwrite($infofile, "mode=" .$mode ."\n"); @@ -33,7 +35,7 @@ function readinfostream($session) if (!file_exists($ram ."streaminfo")) return array("none"); - $infofile = fopen($ram ."streaminfo", 'r'); + $infofile = @fopen($ram ."streaminfo", 'r'); if (!$infofile) return array("none"); -- cgit v1.2.3