summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
authorSavetheinternet <savetheinternet@n0v4.com>2010-11-02 22:58:19 +1100
committerSavetheinternet <savetheinternet@n0v4.com>2010-11-02 22:58:19 +1100
commit4754493e531a2f6cfe4404c302a8de3cf3ba0190 (patch)
tree6d2543d8e103791a3f46ce064fdb67c07bc7adf0 /inc
parent962febb96ae182bcc9670016d3b8313420d1f390 (diff)
Error handling
Diffstat (limited to 'inc')
-rw-r--r--inc/functions.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/inc/functions.php b/inc/functions.php
index 32a943f7..af10f40d 100644
--- a/inc/functions.php
+++ b/inc/functions.php
@@ -79,7 +79,7 @@
if(file_exists($filename)) $md5 = md5_file($filename);
$content['pages'] = $pages;
- file_put_contents($filename, Element('index.html', $content)) or error("Couldn't write to file.");
+ @file_put_contents($filename, Element('index.html', $content)) or error("Couldn't write to file.");
if(isset($md5) && $md5 == md5_file($filename)) {
break;
@@ -189,7 +189,7 @@
} else {
$thread->add(new Post($post['id'], $thread->id, $post['subject'], $post['email'], $post['name'], $post['trip'], $post['body'], $post['time'], $post['thumb'], $post['thumbwidth'], $post['thumbheight'], $post['file'], $post['filewidth'], $post['fileheight'], $post['filesize'], $post['filename']));
}
- file_put_contents(DIR_RES . $id . '.html', Element('thread.html', Array('button'=>BUTTON_REPLY, 'board'=>$board, 'body'=>$thread->build(), 'post_url' => POST_URL, 'index' => ROOT, 'id' => $id))) or error("Couldn't write to file.");
+ @file_put_contents(DIR_RES . $id . '.html', Element('thread.html', Array('button'=>BUTTON_REPLY, 'board'=>$board, 'body'=>$thread->build(), 'post_url' => POST_URL, 'index' => ROOT, 'id' => $id))) or error("Couldn't write to file.");
}
mysql_free_result($query);
}