From de1f6329ff7dae141bb0073a0be8604a5c7dd525 Mon Sep 17 00:00:00 2001 From: rxu Date: Wed, 25 Jun 2025 22:44:08 +0700 Subject: [PATCH] [ticket/17525] Fix tests PHPBB-17525 --- phpBB/phpbb/db/doctrine/table_helper.php | 2 +- tests/dbal/migrator_test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/db/doctrine/table_helper.php b/phpBB/phpbb/db/doctrine/table_helper.php index 70ac39078f..ec5c2040e8 100644 --- a/phpBB/phpbb/db/doctrine/table_helper.php +++ b/phpBB/phpbb/db/doctrine/table_helper.php @@ -214,7 +214,7 @@ class table_helper ]; // Add table prefix to additional tables - if (!empty($table_prefix && !empty($additional_tables))) + if (!empty($table_prefix) && !empty($additional_tables)) { foreach ($additional_tables as $key => $value) { diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php index ac502f1816..454c05b5eb 100644 --- a/tests/dbal/migrator_test.php +++ b/tests/dbal/migrator_test.php @@ -491,7 +491,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case $index_prefix = $short_table_names[$table_name] . '_'; foreach ($key_names as $key_name) { - $this->assertFalse(strpos($key_name, $index_prefix), "$key_name does not contain $index_prefix"); + $this->assertEquals(0, strpos($key_name, $index_prefix), "$key_name does not contain $index_prefix"); } } }