Skip to content

Commit

Permalink
Improved debug output (#699)
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Aug 8, 2018
1 parent 282e557 commit 622b212
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/View/Text.php
Expand Up @@ -80,11 +80,10 @@ protected function addDebug(Util\Debug $debug) {
echo "message:\t" . $message['message'] . PHP_EOL; // TODO add more information
}

echo "sql:\t" . PHP_EOL;
foreach ($debug->getQueries() as $query) {
echo "query:\t" . $query['sql'] . PHP_EOL;
if (isset($query['parameters'])) {
echo "\tparameters:\t" . implode(', ', $query['parameters']) . PHP_EOL;
}
$parameters = isset($query['params']) ? $query['params'] : [];
echo Util\Debug::getParametrizedQuery($query['sql'], $parameters) . PHP_EOL;
}
}

Expand Down

0 comments on commit 622b212

Please sign in to comment.