You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be a bug in dropdown(). If only $order, but not $attributes is passed in, the index 2 is incorrect for attributes and $attributes will end up having the integer value for $order. Perhaps check $order to make sure it's an array if people leave $order out of the arguments? Will fix and create pull request as soon as I can figure out how to set up my SSH keys. Let me know if I am incorrect.
public function dropdown($title, \Closure $callback, $order = null, array $attributes = array())
{
$properties = compact('title', 'order', 'attributes');
if (func_num_args() == 3) {
$arguments = func_get_args();
$title = Arr::get($arguments, 0);
// If only $order is passed in without attributes, 2 is the wrong index
$attributes = Arr::get($arguments, 2);
$properties = compact('title', 'attributes');
}
$item = MenuItem::make($properties);
call_user_func($callback, $item);
$this->items[] = $item;
return $item;
}
The text was updated successfully, but these errors were encountered:
There appears to be a bug in dropdown(). If only $order, but not $attributes is passed in, the index 2 is incorrect for attributes and $attributes will end up having the integer value for $order. Perhaps check $order to make sure it's an array if people leave $order out of the arguments? Will fix and create pull request as soon as I can figure out how to set up my SSH keys. Let me know if I am incorrect.
The text was updated successfully, but these errors were encountered: