From: Marcel Werk Date: Thu, 21 Jul 2016 20:14:55 +0000 (+0200) Subject: Overhauled install.php exception output X-Git-Tag: 3.0.0_Beta_1~1014 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=314f7e0eb19ffb74e6fbc757cc018bf1bba755a7;p=GitHub%2FWoltLab%2FWCF.git Overhauled install.php exception output --- diff --git a/wcfsetup/install.php b/wcfsetup/install.php index 4e1d79b7c0..4deab78807 100644 --- a/wcfsetup/install.php +++ b/wcfsetup/install.php @@ -84,71 +84,322 @@ class SystemException extends \Exception implements IPrintableException { * This method is called by WCF::handleException(). */ public function show() { - ?> + /* + * A notice on the HTML used below: + * + * It might appear a bit weird to use

all over the place where semantically + * other elements would fit in way better. The reason behind this is that we avoid + * inheriting unwanted styles (e.g. exception displayed in an overlay) and that + * the output needs to be properly readable when copied & pasted somewhere. + * + * Besides the visual appearance, the output was built to provide a maximum of + * compatibility and readability when pasted somewhere else, e.g. a WYSIWYG editor + * without the potential of messing up the formatting and thus harming the readability. + */ +?> -Fatal error: <?php echo htmlspecialchars($this->getMessage()); ?> - - - - - -

-

Fatal error: getMessage()); ?>

+ Fatal Error: <?php echo htmlentities($this->getMessage()); ?> + + + + + +
+
+
+

An error has occured

+
- functions; ?> +
+

System Information

+
    +
  • +

    PHP Version:

    +

    +
  • +
  • +

    WoltLab Suite Core:

    +

    3.0

    +
  • +
  • +

    Peak Memory Usage:

    +

    /

    +
  • +
  • +

    Request URI:

    +

    +
  • +
  • +

    Referrer:

    +

    +
  • +
  • +

    User Agent:

    +

    +
  • +
+
+ + +
+

getPrevious() && !$first) { echo "Original "; } else if ($this->getPrevious() && $first) { echo "Final "; } ?>Error

+ getDescription()) { ?> +

getDescription(); ?>

+ +
    +
  • +

    Error Type:

    +

    +
  • +
  • +

    Error Message:

    +

    getMessage()); ?>

    +
  • + getCode()) { ?> +
  • +

    Error Code:

    +

    getCode()); ?>

    +
  • + +
  • +

    File:

    +

    getFile()); ?> (getLine(); ?>)

    +
  • + +
  • +

    Stack Trace:

    +
      + getTrace(); + for ($i = 0, $max = count($trace); $i < $max; $i++) { + ?> +
    • +
    • + 5) return "[ ".count($keys)." items ]"; + return '[ '.implode(', ', array_map(function ($item) { + return $item.' => '; + }, $keys)).']'; + case 'object': + return get_class($item); + } + + throw new \LogicException('Unreachable'); + }, $trace[$i]['args'])); + echo ')
    • '; + } + ?> +
    +
  • +
+
+ getPrevious())); + ?>