diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-06-23 21:41:04 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-06-23 21:41:04 +0200 |
commit | 3fd7fd435db3a580fed329bea74ab30cbb4d14a2 (patch) | |
tree | 22587fcebaa6d82fbfe46fab4802dff9cab0fccc /tests | |
parent | e45cd32de7617be07557d7d8ccf4a8715717b0df (diff) | |
download | forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.tar forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.tar.gz forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.tar.bz2 forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.tar.xz forums-3fd7fd435db3a580fed329bea74ab30cbb4d14a2.zip |
[ticket/12763] Remove empty schema files
PHPBB3-12763
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_framework/phpbb_database_test_connection_manager.php | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/test_framework/phpbb_database_test_connection_manager.php b/tests/test_framework/phpbb_database_test_connection_manager.php index 0d0f08f1f5..92e2080dba 100644 --- a/tests/test_framework/phpbb_database_test_connection_manager.php +++ b/tests/test_framework/phpbb_database_test_connection_manager.php @@ -342,14 +342,17 @@ class phpbb_database_test_connection_manager $filename = $directory . $schema . '_schema.sql'; - $queries = file_get_contents($filename); - $sql = phpbb_remove_comments($queries); + if (file_exists($filename)) + { + $queries = file_get_contents($filename); + $sql = phpbb_remove_comments($queries); - $sql = split_sql_file($sql, $this->dbms['DELIM']); + $sql = split_sql_file($sql, $this->dbms['DELIM']); - foreach ($sql as $query) - { - $this->pdo->exec($query); + foreach ($sql as $query) + { + $this->pdo->exec($query); + } } // Ok we have the db info go ahead and work on building the table |