From cf29450b996515637534a3a8dee6577214c654f1 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 30 Apr 2012 15:40:29 -0500 Subject: [PATCH] Fix bug in array_pluck helper. --- laravel/helpers.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/laravel/helpers.php b/laravel/helpers.php index 9927d9af..3e49f047 100644 --- a/laravel/helpers.php +++ b/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];