From: Joshua Rüsweg Date: Wed, 28 Aug 2019 19:20:36 +0000 (+0200) Subject: Optimize legibility of if condition which checks against numbers X-Git-Tag: 5.2.0_Beta_2~84 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f72eb218b039a45ef8166a6105695ed01425aed;p=GitHub%2FWoltLab%2FWCF.git Optimize legibility of if condition which checks against numbers --- 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)) {