Commit 85f9d329 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #7551: General Error. Access to undefined index

parent 0dbe8e91
Pipeline #1264 passed with stage
in 1 minute and 39 seconds
......@@ -324,9 +324,8 @@ class Database {
}
// Look for missing '()' after FROM in case LEFT JOIN is used.
if (stripos($errorMsg, 'Unknown column') !== false &&
stripos($pos = $sql, ' LEFT JOIN ') !== false &&
isset($sql[$pos - 1]) && $sql[$pos - 1] != ')') {
$pos = stripos($sql, ' LEFT JOIN ');
if (stripos($errorMsg, 'Unknown column') !== false && $pos !== false && ($sql[$pos - 1] ?? '') != ')') {
$msg .= "HINT: Maybe the tables after 'FROM' should be enclosed by '()' \n";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment