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

Test Failure Report for ext/pdo_odbc/tests/pdo_024.phpt ('ODBC 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))');
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

bind: success
bool(true)
string(0) ""

Diff

# original source file: ext/pdo/tests/pdo_024.phpt
003+ string(0) ""
003- NULL

 

Generated at Mon, 29 Sep 2014 14:26:37 +0000 (2 days ago)

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