From 14b0ae49f38aeef1b46e5abf30d8aa6ec5ede17f Mon Sep 17 00:00:00 2001 From: Golubev Alexander Date: Thu, 28 Feb 2019 17:29:47 +0300 Subject: [PATCH] Fix a silent blank page on critial errors Currently if there is a critical error during early object construction the script just dies silently. This patch fixes it making sure that the error message would be passed down and e.g. displayed in a message box. One example of such error is: > Cannot find any of the supported PHP image extensions! --- core/class/uploader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/class/uploader.php b/core/class/uploader.php index 447d0ff..acfd78b 100644 --- a/core/class/uploader.php +++ b/core/class/uploader.php @@ -696,7 +696,8 @@ protected function backMsg($message, array $data=null) { protected function callBack($url, $message="") { $message = text::jsValue($message); - if ((get_class($this) == "kcfinder\\browser") && ($this->action != "browser")) + if ((get_class($this) == "kcfinder\\browser") + && ($this->action !== null) && ($this->action != "browser")) return; if (isset($this->opener['name'])) {