PHP  
 PHP_7_2
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/pdo_firebird/tests/bug_73234.phpt ('FIREBIRD PDO Common: Bug #73234 (Emulated statements let value dictate parameter type)')

Script

1: <?php
2:
if (getenv('REDIR_TEST_DIR') === falseputenv('REDIR_TEST_DIR='.dirname(__FILE__) . '/../../pdo/tests/');
3: require_once 
getenv('REDIR_TEST_DIR') . 'pdo_test.inc';
4:
5:
$db PDOTest::factory();
6:
$db->setAttribute(PDO::ATTR_EMULATE_PREPAREStrue);
7:
$db->exec('CREATE TABLE test(id INT NULL)');
8:
9:
$stmt $db->prepare('INSERT INTO test VALUES(:value)');
10:
11:
$stmt->bindValue(':value'0PDO::PARAM_NULL);
12:
$stmt->execute();
13:
14:
$stmt->bindValue(':value'nullPDO::PARAM_NULL);
15:
$stmt->execute();
16:
17:
$stmt $db->query('SELECT * FROM test');
18:
var_dump($stmt->fetchAll(PDO::FETCH_ASSOC));
19:
?>
20:

Expected

array(2) {
  [0]=>
  array(1) {
    ["id"]=>
    NULL
  }
  [1]=>
  array(1) {
    ["id"]=>
    NULL
  }
}

Output

Warning: PDO::exec(): SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 26 NULL  in /var/php_gcov/PHP_7_2/ext/pdo_firebird/tests/bug_73234.php on line 7

Warning: PDO::prepare(): SQLSTATE[HY000]: General error: -204 Dynamic SQL Error SQL error code = -204 Table unknown TEST At line 1, column 13  in /var/php_gcov/PHP_7_2/ext/pdo_firebird/tests/bug_73234.php on line 9

Fatal error: Uncaught Error: Call to a member function bindValue() on boolean in /var/php_gcov/PHP_7_2/ext/pdo_firebird/tests/bug_73234.php:11
Stack trace:
#0 {main}
  thrown in /var/php_gcov/PHP_7_2/ext/pdo_firebird/tests/bug_73234.php on line 11

Diff

# original source file: ext/pdo/tests/bug_73234.phpt
001+ Warning: PDO::exec(): SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 26 NULL  in /var/php_gcov/PHP_7_2/ext/pdo_firebird/tests/bug_73234.php on line 7
002+ 
003+ Warning: PDO::prepare(): SQLSTATE[HY000]: General error: -204 Dynamic SQL Error SQL error code = -204 Table unknown TEST At line 1, column 13  in /var/php_gcov/PHP_7_2/ext/pdo_firebird/tests/bug_73234.php on line 9
004+ 
005+ Fatal error: Uncaught Error: Call to a member function bindValue() on boolean in /var/php_gcov/PHP_7_2/ext/pdo_firebird/tests/bug_73234.php:11
006+ Stack trace:
007+ #0 {main}
008+   thrown in /var/php_gcov/PHP_7_2/ext/pdo_firebird/tests/bug_73234.php on line 11
001- array(2) {
002-   [0]=>
003-   array(1) {
004-     ["id"]=>
005-     NULL
006-   }
007-   [1]=>
008-   array(1) {
009-     ["id"]=>
010-     NULL
011-   }
012- }

 

Generated at Sat, 16 Sep 2017 05:04:10 +0000 (5 days ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.