Integrated evaluation notice for apps
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / lib / acp / page / ExceptionLogViewPage.class.php
index 3327c3672ed2c0fd5833cbb2e1c744de51ba81de..4f4b559546697ec41b2b25f367c0ed0850107574 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+declare(strict_types=1);
 namespace wcf\acp\page;
 use wcf\page\AbstractPage;
 use wcf\page\MultipleLinkPage;
@@ -14,7 +15,7 @@ use wcf\util\StringUtil;
  * Shows the exception log.
  * 
  * @author     Tim Duesterhus
- * @copyright  2001-2017 WoltLab GmbH
+ * @copyright  2001-2018 WoltLab GmbH
  * @license    GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
  * @package    WoltLabSuite\Core\Acp\Page
  */
@@ -150,7 +151,6 @@ class ExceptionLogViewPage extends MultipleLinkPage {
 "Extra Information: (?P<information>(?:-|[a-zA-Z0-9+/]+={0,2}))\s*\n".
 "Stack Trace: (?P<stack>\[[^\n]+\])", Regex::DOT_ALL);
                
-               $isPhp7 = version_compare(PHP_VERSION, '7.0.0') >= 0;
                foreach ($this->exceptions as $key => $val) {
                        $i++;
                        if ($i < $this->startIndex || $i > $this->endIndex) {
@@ -165,15 +165,12 @@ class ExceptionLogViewPage extends MultipleLinkPage {
                        $matches = $exceptionRegex->getMatches();
                        $chainRegex->match($matches['chain'], true, Regex::ORDER_MATCH_BY_SET);
                        
-                       $chainMatches = array_map(function ($item) use ($isPhp7) {
-                               if ($item['information'] === '-') $item['information'] = null;
+                       $chainMatches = array_map(function ($item) {
+                               if ($item['information'] === '-') {
+                                       $item['information'] = null;
+                               }
                                else {
-                                       if ($isPhp7) {
-                                               $item['information'] = unserialize(base64_decode($item['information']), ['allowed_classes' => false]);
-                                       }
-                                       else {
-                                               $item['information'] = unserialize(base64_decode($item['information']));
-                                       }
+                                       $item['information'] = unserialize(base64_decode($item['information']), ['allowed_classes' => false]);
                                }
                                
                                $item['stack'] = JSON::decode($item['stack']);