X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FBaseModule.php;h=d9c7da97a7b8d3c6b30a97f682d51f1598aaf34e;hb=739ca603bc388c97a11a8d6a4843396bf5d52088;hp=12efbce81170b476918e9a922453f37aa179db24;hpb=e0fa557f18d544d81c37fa8c2554ec5240a64d4b;p=friendica.git diff --git a/src/BaseModule.php b/src/BaseModule.php index 12efbce811..d9c7da97a7 100644 --- a/src/BaseModule.php +++ b/src/BaseModule.php @@ -1,6 +1,6 @@ response->addContent($arr['content']); $this->response->addContent($this->content($request)); } catch (HTTPException $e) { + // In case of System::externalRedirects(), we don't want to prettyprint the exception + // just redirect to the new location + if (($e instanceof HTTPException\FoundException) || + ($e instanceof HTTPException\MovedPermanentlyException) || + ($e instanceof HTTPException\TemporaryRedirectException)) { + throw $e; + } + $this->response->addContent($httpException->content($e)); } finally { $this->profiler->set(microtime(true) - $timestamp, 'content');