From 0eba6fa4c33d16012c7061c3256c4dfa217bef7c Mon Sep 17 00:00:00 2001 From: 8chan Date: Wed, 22 Oct 2014 19:16:13 -0700 Subject: [PATCH] This was crashing rebuild.php for some reason... --- inc/api.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/api.php b/inc/api.php index c9608f06..db723962 100644 --- a/inc/api.php +++ b/inc/api.php @@ -109,7 +109,7 @@ class Api { if (isset($post->files) && $post->files && !$threadsPage) { $file = $post->files[0]; $this->translateFields($this->fileFields, $file, $apiPost); - $apiPost['filename'] = substr($file->name, 0, strrpos($file->name, '.')); + $apiPost['filename'] = @substr($file->name, 0, strrpos($file->name, '.')); $dotPos = strrpos($file->file, '.'); $apiPost['ext'] = substr($file->file, $dotPos); $apiPost['tim'] = substr($file->file, 0, $dotPos);