From: Marcel Werk Date: Thu, 9 Apr 2020 20:01:28 +0000 (+0200) Subject: Fixed incorrect detection of numerics X-Git-Tag: 3.1.14~27^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b2f00d92161b7abd7760d527fd68b724267ace59;p=GitHub%2FWoltLab%2FWCF.git Fixed incorrect detection of numerics --- diff --git a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php index 896dc16949..54c8ad3e6b 100644 --- a/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/AbstractAttachmentImporter.class.php @@ -47,7 +47,7 @@ class AbstractAttachmentImporter extends AbstractImporter { $data['userID'] = ImportHandler::getInstance()->getNewID('com.woltlab.wcf.user', $data['userID']); // check existing attachment id - if (is_numeric($oldID)) { + if (ctype_digit((string)$oldID)) { $attachment = new Attachment($oldID); if (!$attachment->attachmentID) $data['attachmentID'] = $oldID; } diff --git a/wcfsetup/install/files/lib/system/importer/ArticleImporter.class.php b/wcfsetup/install/files/lib/system/importer/ArticleImporter.class.php index 8638969770..9fedffe56d 100644 --- a/wcfsetup/install/files/lib/system/importer/ArticleImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/ArticleImporter.class.php @@ -66,7 +66,7 @@ class ArticleImporter extends AbstractImporter { } // check old id - if (is_numeric($oldID)) { + if (ctype_digit((string)$oldID)) { $article = new Article($oldID); if (!$article->articleID) $data['articleID'] = $oldID; } diff --git a/wcfsetup/install/files/lib/system/importer/MediaImporter.class.php b/wcfsetup/install/files/lib/system/importer/MediaImporter.class.php index d7c82ec97a..a483f46699 100644 --- a/wcfsetup/install/files/lib/system/importer/MediaImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/MediaImporter.class.php @@ -63,7 +63,7 @@ class MediaImporter extends AbstractImporter { } // check old id - if (is_numeric($oldID)) { + if (ctype_digit((string)$oldID)) { $media = new Media($oldID); if (!$media->mediaID) $data['mediaID'] = $oldID; } diff --git a/wcfsetup/install/files/lib/system/importer/UserImporter.class.php b/wcfsetup/install/files/lib/system/importer/UserImporter.class.php index 1bbcd77645..5994d9fd1b 100644 --- a/wcfsetup/install/files/lib/system/importer/UserImporter.class.php +++ b/wcfsetup/install/files/lib/system/importer/UserImporter.class.php @@ -97,7 +97,7 @@ class UserImporter extends AbstractImporter { } // check existing user id - if (is_numeric($oldID)) { + if (ctype_digit((string)$oldID)) { $user = new User($oldID); if (!$user->userID) $data['userID'] = $oldID; }