Test Failure Report for ext/pdo_odbc/tests/bug_39398.phpt ('ODBC PDO Common: Bug #39398 (Booleans are not automatically translated to integers)')
Script
1:
<?php 2: if (getenv('REDIR_TEST_DIR') === false) putenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/'); 3: require_once getenv('REDIR_TEST_DIR') . 'pdo_test.inc'; 4: 5: $db = PDOTest::factory(); 6: $db->exec("CREATE TABLE test (test INT)"); 7: 8: $boolean = 1; 9: $stmt = $db->prepare('INSERT INTO test VALUES (:boolean)'); 10: $stmt->bindValue(':boolean', isset($boolean), PDO::PARAM_INT); 11: $stmt->execute(); 12: 13: var_dump($db->query("SELECT * FROM test")->fetchAll(PDO::FETCH_ASSOC)); 14: ?> 15: ===DONE=== 16:
Expected
array(1) {
[0]=>
array(1) {
["test"]=>
string(1) "1"
}
}
===DONE===
Output
array(1) {
[0]=>
array(1) {
["test"]=>
NULL
}
}
===DONE===
Diff
# original source file: ext/pdo/tests/bug_39398.phpt
005+ NULL
005- string(1) "1"
Generated at Tue, 18 Jun 2013 13:30:52 +0000 (40 hours ago)
|