From 9f72eb218b039a45ef8166a6105695ed01425aed Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Wed, 28 Aug 2019 21:20:36 +0200 Subject: [PATCH] Optimize legibility of if condition which checks against numbers --- .../files/lib/acp/page/ModificationLogListPage.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/acp/page/ModificationLogListPage.class.php b/wcfsetup/install/files/lib/acp/page/ModificationLogListPage.class.php index 97fbb8aa35..939fea69a3 100644 --- a/wcfsetup/install/files/lib/acp/page/ModificationLogListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/ModificationLogListPage.class.php @@ -192,7 +192,7 @@ class ModificationLogListPage extends SortablePage { $packageID = 0; // an integer signals all actions from the package with the relevant id - if ($this->action == strval(intval($this->action))) { + if (preg_match('/^[0-9]+$/', $this->action)) { $packageID = $this->action; } else if (preg_match('~^(?P.+)\-(?P[^\-]+)$~', $this->action, $matches)) { -- 2.20.1