Update Saqel Platform: 2026-09-08 13:59:41
This commit is contained in:
@@ -93,7 +93,11 @@ class SaqelEcosystemTester
|
|||||||
$pdo = Database::getConnection();
|
$pdo = Database::getConnection();
|
||||||
$this->assert($pdo instanceof \PDO, 'الاتصال بقاعدة البيانات PDO نشط ومستقر');
|
$this->assert($pdo instanceof \PDO, 'الاتصال بقاعدة البيانات PDO نشط ومستقر');
|
||||||
foreach ($tables as $tbl) {
|
foreach ($tables as $tbl) {
|
||||||
$check = Database::selectOne("SHOW TABLES LIKE ?", [$tbl]);
|
// MySQL does not accept PDO placeholders in SHOW TABLES LIKE.
|
||||||
|
// Table names come from this fixed internal allow-list, so quote
|
||||||
|
// the value explicitly rather than interpolating user input.
|
||||||
|
$safeTable = str_replace('`', '``', (string) $tbl);
|
||||||
|
$check = Database::selectOne("SHOW TABLES LIKE '" . addslashes($safeTable) . "'");
|
||||||
$this->assert(!empty($check), "جدول $tbl متوفر في قاعدة البيانات");
|
$this->assert(!empty($check), "جدول $tbl متوفر في قاعدة البيانات");
|
||||||
}
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user