mirror of
https://github.com/PostgreSQL-For-Wordpress/postgresql-for-wordpress.git
synced 2025-07-29 17:27: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';
|
||||
$full = $matches[1];
|
||||
$table = $matches[2];
|
||||
$like = $matches[3];
|
||||
$where = $matches[4];
|
||||
$like = isset($matches[3]) ? $matches[3] : FALSE;
|
||||
$where = isset($matches[4]) ? $matches[4] : FALSE;
|
||||
// Wrap as sub-query to emulate WHERE behavior
|
||||
$sql = ($where ? 'SELECT * FROM (' : '').
|
||||
'SELECT column_name as "Field",
|
||||
|
Reference in New Issue
Block a user