Browse Source

Fix bug in array_pluck helper.

Taylor Otwell 12 years ago
parent
commit
cf29450b99
1 changed files with 1 additions and 1 deletions
  1. 1 1
      laravel/helpers.php

+ 1 - 1
laravel/helpers.php

@@ -238,7 +238,7 @@ function array_divide($array)
  */
 function array_pluck($array, $key)
 {
-	return array_map(function($v)
+	return array_map(function($v) use ($key)
 	{
 		return is_object($v) ? $v->$key : $v[$key];