From 621fee09be6f9412808d57305661ca16ae0e4b68 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 27 Feb 2012 09:28:21 -0600 Subject: [PATCH] cleaning up code. Signed-off-by: Taylor Otwell --- laravel/database/connection.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/laravel/database/connection.php b/laravel/database/connection.php index 9369f2ba..f38f9873 100644 --- a/laravel/database/connection.php +++ b/laravel/database/connection.php @@ -172,11 +172,13 @@ protected function execute($sql, $bindings = array()) // Since expressions are injected into the query as strings, we need to // remove them from the array of bindings. After we have removed them, - // we'll reset the array so there aren't gaps in the keys. - $bindings = array_values(array_filter($bindings, function($binding) + // we'll reset the array so there are not gaps within the keys. + $bindings = array_filter($bindings, function($binding) { return ! $binding instanceof Expression; - })); + }); + + $bindings = array_values($bindings); $sql = $this->grammar()->shortcut($sql, $bindings);