Backslashes in searches cause SQL errors when using Postgres #4489
Replies: 1 comment
-
|
@philipprumpf, this regression has been around for quite a while -- it is tracked by VUFIND-1385. The bad news is that because it's a low-level bug in laminas-db and that package is essentially abandoned, I think it is unlikely to ever get fixed on the Laminas side. The good news is that #2233 completely replaces laminas-db with Doctrine, which solves the problem. This work will be included in release 11.0; it will also be merged to the dev branch soon (it currently passes 100% of tests, but there are some schema validation issues that are still being worked on). If you need to solve this problem immediately, you could at least consider being an early adopter of the Doctrine branch. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We're using VuFind with PostgreSQL, and appear to be having some trouble with searches containing backslashes; it seems like the issue fixed by #599 has reappeared. Does anyone have a workaround?
The error message for a search for a single backslash is this:
It seems that in an attempt to fix zendframework/zend-db#35, parameter names in SQL statements are now always set to
c_1,c_2, ..., rather than the column names. However, the "errata" method for overriding parameter types hasn't been adjusted. This means that replacing this line inDB/Table/Search.php:by
works, but it's obviously not the right fix, since it applies to the third parameter of any prepared statement.
I'm probably missing something and this is easy to fix.
Beta Was this translation helpful? Give feedback.
All reactions