Improved the way the quotes were added to the bindings.

This commit is contained in:
Loic Sharma 2012-06-05 22:57:56 -05:00
parent ea3021f3dd
commit f2e915f13d
1 changed files with 2 additions and 1 deletions

View File

@ -5,6 +5,7 @@
use Laravel\Event; use Laravel\Event;
use Laravel\Config; use Laravel\Config;
use Laravel\Request; use Laravel\Request;
use Laravel\Database;
class Profiler { class Profiler {
@ -54,7 +55,7 @@ public static function query($sql, $bindings, $time)
{ {
foreach ($bindings as $binding) foreach ($bindings as $binding)
{ {
$binding = "'{$binding}'"; $binding = Database::connection()->pdo->quote($binding);
$sql = preg_replace('/\?/', $binding, $sql, 1); $sql = preg_replace('/\?/', $binding, $sql, 1);
} }