From 30f4b5b5c204afabf76f4a56c2b0393e3be78aad Mon Sep 17 00:00:00 2001 From: 8chan Date: Sun, 9 Nov 2014 23:23:47 -0800 Subject: [PATCH] Compatability fix --- inc/api.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/inc/api.php b/inc/api.php index 6691d758..4e3f1c4f 100644 --- a/inc/api.php +++ b/inc/api.php @@ -91,7 +91,8 @@ class Api { $dotPos = strrpos($file->file, '.'); $apiPost['ext'] = substr($file->file, $dotPos); $apiPost['tim'] = substr($file->file, 0, $dotPos); - $apiPost['md5'] = base64_encode(hex2bin($file->hash)); + if (isset($file->hash)) + $apiPost['md5'] = base64_encode(hex2bin($file->hash)); } private function translatePost($post, $threadsPage = false) {