mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-07-30 17:57:13 +02:00
Fix match for string-quoted identifier
The pattern added in 785307ee
only matches single-character identifiers,
but should match identifiers of any non-zero length. Fix it.
Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
This commit is contained in:
@ -323,7 +323,7 @@
|
||||
// MySQL supports strings as names, PostgreSQL needs identifiers.
|
||||
// Limit to after closing parenthesis to reduce false-positives
|
||||
// Currently only an issue for nextgen-gallery plugin
|
||||
$pattern = '/\) AS \'([^\'])\'/';
|
||||
$pattern = '/\) AS \'([^\']+)\'/';
|
||||
$sql = preg_replace( $pattern, ') AS "$1"', $sql);
|
||||
} // SELECT
|
||||
elseif( 0 === strpos($sql, 'UPDATE'))
|
||||
|
Reference in New Issue
Block a user