From c0e87ae2aec0c6a37187b73b3e2e2c39f7e042a5 Mon Sep 17 00:00:00 2001 From: jgen Date: Thu, 11 May 2017 23:43:10 -0700 Subject: [PATCH] Fix issue with archive handler if no add_status method. --- ext/handle_archive/main.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/handle_archive/main.php b/ext/handle_archive/main.php index 1fe56ca6..ad43c4ac 100644 --- a/ext/handle_archive/main.php +++ b/ext/handle_archive/main.php @@ -35,8 +35,10 @@ class ArchiveFileHandler extends Extension { exec($cmd); $results = add_dir($tmpdir); if(count($results) > 0) { - // FIXME no theme? - $this->theme->add_status("Adding files", $results); + // Not all themes have the add_status() method, so need to check before calling. + if (method_exists($this->theme, "add_status")) { + $this->theme->add_status("Adding files", $results); + } } deltree($tmpdir); $event->image_id = -2; // default -1 = upload wasn't handled