Skip to content

Commit

Permalink
kcfinder: fix a silent blank page on critial errors
Browse files Browse the repository at this point in the history
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: sunhater/kcfinder#177
 * original issue repot [russian]:
   https://mjdm.ru/forum/viewtopic.php?f=24&t=6177
  • Loading branch information
Fat-Zer committed Feb 28, 2019
1 parent b8054db commit 3f947e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 3rdparty/kcfinder/core/class/uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'])) {
Expand Down

0 comments on commit 3f947e0

Please sign in to comment.