From 0d3c06e7e233d4ae2ffec3563c8fca72bdd479ae Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Fri, 11 Jun 2021 17:11:48 +0200 Subject: [PATCH] Support `Database::prepare()` during WCFSetup --- .../files/lib/system/database/Database.class.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/wcfsetup/install/files/lib/system/database/Database.class.php b/wcfsetup/install/files/lib/system/database/Database.class.php index 2633d043bc..810394e8f8 100644 --- a/wcfsetup/install/files/lib/system/database/Database.class.php +++ b/wcfsetup/install/files/lib/system/database/Database.class.php @@ -346,12 +346,16 @@ abstract class Database { static $regex = null; if ($regex === null) { - $abbreviations = \implode( - '|', - \array_map(static function (Application $app): string { - return \preg_quote($app->getAbbreviation(), '~'); - }, ApplicationHandler::getInstance()->getApplications()) - ); + if (!PACKAGE_ID) { + $abbreviations = 'wcf'; + } else { + $abbreviations = \implode( + '|', + \array_map(static function (Application $app): string { + return \preg_quote($app->getAbbreviation(), '~'); + }, ApplicationHandler::getInstance()->getApplications()) + ); + } $regex = "~(\\b(?:{$abbreviations}))1_~"; } -- 2.20.1