PHP  
 PHP_7_1
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/pdo_024.phpt ('FIREBIRD PDO Common: assert that bindParam does not modify parameter')

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:
$db PDOTest::factory();
5:
6:
$db->exec('create table test (id int, name varchar(10) null)');
7:
8:
$stmt $db->prepare('insert into test (id, name) values(0, :name)');
9:
$name NULL;
10:
$before_bind $name;
11:
$stmt->bindParam(':name'$name);
12: if (
$name !== $before_bind) {
13:     echo 
"bind: fail\n";
14: } else {
15:     echo 
"bind: success\n";
16: }
17:
var_dump($stmt->execute());
18:
var_dump($db->query('select name from test where id=0')->fetchColumn());
19:
20:
?>
21:

Expected

bind: success
bool(true)
NULL

Output

Warning: PDO::exec(): SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 45 null  in /var/php_gcov/PHP_7_1/ext/pdo_firebird/tests/pdo_024.php on line 6

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_1/ext/pdo_firebird/tests/pdo_024.php on line 8

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

Diff

# original source file: ext/pdo/tests/pdo_024.phpt
001+ Warning: PDO::exec(): SQLSTATE[HY000]: General error: -104 Dynamic SQL Error SQL error code = -104 Token unknown - line 1, column 45 null  in /var/php_gcov/PHP_7_1/ext/pdo_firebird/tests/pdo_024.php on line 6
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_1/ext/pdo_firebird/tests/pdo_024.php on line 8
001- bind: success
002- bool(true)
003- NULL
004+ 
005+ Fatal error: Uncaught Error: Call to a member function bindParam() on boolean in /var/php_gcov/PHP_7_1/ext/pdo_firebird/tests/pdo_024.php:11
006+ Stack trace:
007+ #0 {main}
008+   thrown in /var/php_gcov/PHP_7_1/ext/pdo_firebird/tests/pdo_024.php on line 11

 

Generated at Mon, 18 Sep 2017 10:30:53 +0000 (5 days ago)

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