diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2011-10-13 23:44:42 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2011-10-13 23:44:42 +0200 |
| commit | 4e69fe68590cca0db66cc90af12e74c58bac10be (patch) | |
| tree | 57492b66815c6fc0e89937f2a591586d1682b339 /tests | |
| parent | e43b7813a5875e8721c7124239c9a9be06d63d27 (diff) | |
| parent | 6d9e9d190179a33ec8873f206f75db0978992bf6 (diff) | |
| download | forums-4e69fe68590cca0db66cc90af12e74c58bac10be.tar forums-4e69fe68590cca0db66cc90af12e74c58bac10be.tar.gz forums-4e69fe68590cca0db66cc90af12e74c58bac10be.tar.bz2 forums-4e69fe68590cca0db66cc90af12e74c58bac10be.tar.xz forums-4e69fe68590cca0db66cc90af12e74c58bac10be.zip | |
Merge remote-tracking branch 'igorw/ticket/10307' into develop-olympus
* igorw/ticket/10307:
[ticket/10307] Add a test for PHPBB3-10307
[ticket/10307] Return false in mysqli sql_fetchrow on empty result
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/dbal/select_test.php | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/dbal/select_test.php b/tests/dbal/select_test.php index e0d08d9306..8ddd27465d 100644 --- a/tests/dbal/select_test.php +++ b/tests/dbal/select_test.php @@ -319,7 +319,7 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $db->sql_freeresult($result); } - function test_nested_transactions() + public function test_nested_transactions() { $db = $this->new_dbal(); @@ -341,4 +341,20 @@ class phpbb_dbal_select_test extends phpbb_database_test_case $this->assertEquals('1', $row['user_id']); } + + /** + * fix for PHPBB3-10307 + */ + public function test_sql_fetchrow_returns_false_when_empty() + { + $db = $this->new_dbal(); + + $sql = 'SELECT * FROM (SELECT 1) AS TBL WHERE 1 = 0'; + $result = $db->sql_query($sql); + + $row = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + $this->assertSame(false, $row); + } } |
