mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-07-31 10:17:13 +02:00
Avoid warnings due to unmatched capture groups
If the non-capturing group which contains the last two capture groups of the expression is not matched, the indexes are not defined in the match result, causing a warning. Avoid this using isset() before access. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
This commit is contained in:
@ -57,8 +57,8 @@
|
|||||||
$logto = 'SHOWCOLUMN';
|
$logto = 'SHOWCOLUMN';
|
||||||
$full = $matches[1];
|
$full = $matches[1];
|
||||||
$table = $matches[2];
|
$table = $matches[2];
|
||||||
$like = $matches[3];
|
$like = isset($matches[3]) ? $matches[3] : FALSE;
|
||||||
$where = $matches[4];
|
$where = isset($matches[4]) ? $matches[4] : FALSE;
|
||||||
// Wrap as sub-query to emulate WHERE behavior
|
// Wrap as sub-query to emulate WHERE behavior
|
||||||
$sql = ($where ? 'SELECT * FROM (' : '').
|
$sql = ($where ? 'SELECT * FROM (' : '').
|
||||||
'SELECT column_name as "Field",
|
'SELECT column_name as "Field",
|
||||||
|
Reference in New Issue
Block a user