Skip to content

Commit

Permalink
Fix #80521: Parameters with underscores no longer recognized
Browse files Browse the repository at this point in the history
We have to use the proper value for the bitmask.
  • Loading branch information
cmb69 committed Dec 16, 2020
1 parent c567016 commit 1860ef2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ PHP NEWS
. Fixed bug #67983 (mysqlnd with MYSQLI_OPT_INT_AND_FLOAT_NATIVE fails to
interpret bit columns). (Nikita)

- PDO_Firebird:
. Fixed bug #80521 (Parameters with underscores no longer recognized). (cmb,
Simonov Denis)

07 Jan 2021, PHP 8.0.1

- Core:
Expand Down
2 changes: 1 addition & 1 deletion ext/pdo_firebird/firebird_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static const char classes_array[] = {
/* 092 \ */ 0,
/* 093 ] */ 0,
/* 094 ^ */ 0,
/* 095 _ */ 65, /* CHR_IDENT | CHR_INTRODUCER */
/* 095 _ */ 68, /* CHR_IDENT | CHR_INTRODUCER */
/* 096 ` */ 0,
/* 097 a */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */
/* 098 b */ 37, /* CHR_LETTER | CHR_IDENT | CHR_HEX */
Expand Down
21 changes: 21 additions & 0 deletions ext/pdo_firebird/tests/bug_80521.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
--TEST--
Bug #80521 (Parameters with underscores no longer recognized)
--SKIPIF--
<?php require('skipif.inc'); ?>
--FILE--
<?php
require 'testdb.inc';

$dbh->exec("CREATE TABLE bug80521 (foo INTEGER)");
var_dump($dbh->prepare("SELECT foo FROM bug80521 WHERE foo = :foo_bar"));
?>
--EXPECTF--
object(PDOStatement)#%d (1) {
["queryString"]=>
string(45) "SELECT foo FROM bug80521 WHERE foo = :foo_bar"
}
--CLEAN--
<?php
require 'testdb.inc';
$dbh->exec("DROP TABLE bug80521");
?>

0 comments on commit 1860ef2

Please sign in to comment.