summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Foster <savetheinternet@tinyboard.org>2013-08-12 23:35:27 +1000
committerMichael Foster <savetheinternet@tinyboard.org>2013-08-12 23:35:27 +1000
commit6fdbe76f7b7b69ca6bfbff65af8096734e46233d (patch)
tree5a1cb94b95ac4aa1131bbdfd373c16ccd1136a68
parent6a1e8e834bd1d0ea1c0f557ae0c54d8b2ae44d61 (diff)
bugfix: sometimes this acts weird
-rw-r--r--post.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/post.php b/post.php
index c55b8bc5..6bed96e1 100644
--- a/post.php
+++ b/post.php
@@ -279,7 +279,10 @@ if (isset($_POST['delete'])) {
error($config['error']['unknownext']);
$post['file_tmp'] = tempnam($config['tmp'], 'url');
- register_shutdown_function('unlink', $post['file_tmp']);
+ function unlink_tmp_file($file) {
+ @unlink($file);
+ }
+ register_shutdown_function('unlink_tmp_file', $post['file_tmp']);
$fp = fopen($post['file_tmp'], 'w');