From 3f947e0dde37ae543982b109ce28508ba319b893 Mon Sep 17 00:00:00 2001 From: Alexander Golubev Date: Thu, 28 Feb 2019 17:35:37 +0300 Subject: [PATCH] kcfinder: 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. See also * upstream PR: https://github.com/sunhater/kcfinder/pull/177 * original issue repot [russian]: https://mjdm.ru/forum/viewtopic.php?f=24&t=6177 --- 3rdparty/kcfinder/core/class/uploader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/3rdparty/kcfinder/core/class/uploader.php b/3rdparty/kcfinder/core/class/uploader.php index 447d0ff79..884c58f72 100644 --- a/3rdparty/kcfinder/core/class/uploader.php +++ b/3rdparty/kcfinder/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'])) {