Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
52 | function testGetModules() |
||
53 | { |
||
54 | $db = MDB2::singleton(DB_DSN); |
||
55 | $result = $db->query('SELECT * FROM module'); |
||
56 | if (PEAR::isError($result)) { |
||
57 | die($result->getMessage() . $result->getUserInfo()); |
||
58 | } |
||
59 | |||
60 | $this->assertTrue(is_array($this->handler->getModules(MDB2::singleton(DB_DSN)))); |
||
61 | $this->assertEquals($result->numRows(), count($this->handler->getModules(MDB2::singleton(DB_DSN)))); |
||
62 | } |
||
63 | } |
||
64 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: