com php-src: Fix #80521: Parameters with underscores no longer recognized: NEWS ext/pdo_firebird/firebird_driver.c ext/pdo_fireb
ird/tests/bug_80521.phpt
| From: | Christoph Michael Becker | Date: | Wed, 16 Dec 2020 19:04:52 +0000 |
| Subject: | com php-src: Fix #80521: Parameters with underscores no longer recognized: NEWS ext/pdo_firebird/firebird_driver.c ext/pdo_fireb ird/tests/bug_80521.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-114487@lists.php.net to get a copy of this message | ||
Commit: 1860ef22eba4fed1e360482cfde32b3bfa16fcc5
Author: Christoph M. Becker <cmbecker69@gmx.de> Wed, 16 Dec 2020 20:02:45 +0100
Parents: c56701690a184c13fa850e9946f09bac7172c604
Branches: PHP-8.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=1860ef22eba4fed1e360482cfde32b3bfa16fcc5
Log:
Fix #80521: Parameters with underscores no longer recognized
We have to use the proper value for the bitmask.
Bugs:
https://bugs.php.net/80521
Changed paths:
M NEWS
M ext/pdo_firebird/firebird_driver.c
A ext/pdo_firebird/tests/bug_80521.phpt
Diff:
diff --git a/NEWS b/NEWS
index c75d6e65495..8b0ce956009 100644
--- a/NEWS
+++ b/NEWS
@@ -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:
diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c
index c27a9e2ed55..7721b64de51 100644
--- a/ext/pdo_firebird/firebird_driver.c
+++ b/ext/pdo_firebird/firebird_driver.c
@@ -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 */
diff --git a/ext/pdo_firebird/tests/bug_80521.phpt b/ext/pdo_firebird/tests/bug_80521.phpt
new file mode 100644
index 00000000000..dc5916d5469
--- /dev/null
+++ b/ext/pdo_firebird/tests/bug_80521.phpt
@@ -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");
+?>