Browse Source

fix bug affecting using db::raw with eloquent.

Taylor Otwell 13 years ago
parent
commit
ddd6d44782
1 changed files with 2 additions and 0 deletions
  1. 2 0
      laravel/database/connection.php

+ 2 - 0
laravel/database/connection.php

@@ -158,6 +158,8 @@ class Connection {
 			if ($value instanceof Expression) unset($bindings[$key]);
 		}
 
+		$bindings = array_values($bindings);
+
 		$sql = $this->transform($sql, $bindings);
 
 		$this->queries[] = compact('sql', 'bindings');