We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f25f8ab commit 015cc60Copy full SHA for 015cc60
1 file changed
Classes/Logging/DebugStack.php
@@ -81,8 +81,9 @@ public function stopQuery(): void
81
protected function parseTableName(string $sql): string
82
{
83
$sql = strtolower($sql);
84
- $start = strpos($sql, 'from ') + 5;
85
- $end = strpos($sql, ' ', $start);
86
- return substr($sql, $start, $end - $start);
+ if (preg_match('/from\s+([`"\[]?[\w.]+[`"\]]?)/', $sql, $matches)) {
+ return trim($matches[1], '`"[]');
+ }
87
+ return '';
88
}
89
0 commit comments