Browse Source

Fix bug in update database grammar.

Taylor Otwell 13 years ago
parent
commit
c3c0fbce96
1 changed files with 3 additions and 1 deletions
  1. 3 1
      laravel/database/grammars/grammar.php

+ 3 - 1
laravel/database/grammars/grammar.php

@@ -301,9 +301,11 @@ class Grammar {
 	{
 		foreach ($values as $column => $value)
 		{
-			$columns = $this->wrap($column).' = '.$this->parameter($value);
+			$columns[] = $this->wrap($column).' = '.$this->parameter($value);
 		}
 
+		$columns = implode(', ', $columns);
+
 		return trim('UPDATE '.$this->wrap($query->from).' SET '.$columns.' '.$this->wheres($query));
 	}