summaryrefslogtreecommitdiff
path: root/includes/inc_streaminfo.php
diff options
context:
space:
mode:
authorTheTroll <trolldev@gmail.com>2010-02-26 16:40:40 +0100
committerTheTroll <trolldev@gmail.com>2010-02-26 16:40:40 +0100
commitc11a6fccfe76152f1bf0e26bbe2af3cf81d91c34 (patch)
treeb398a6e418e8e9f74e2e901f417a4e92bdf71989 /includes/inc_streaminfo.php
parentd85aa30e9aa6ef1f1f42fb4af54364f6884cfa3a (diff)
downloadistreamdev-c11a6fccfe76152f1bf0e26bbe2af3cf81d91c34.tar.gz
istreamdev-c11a6fccfe76152f1bf0e26bbe2af3cf81d91c34.tar.bz2
Added more check when opening a file
Diffstat (limited to 'includes/inc_streaminfo.php')
-rwxr-xr-xincludes/inc_streaminfo.php6
1 files changed, 5 insertions, 1 deletions
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);