[Tickets #14581] Re: Array operation on non-array throws warnings - fix available

noreply at bugs.horde.org noreply at bugs.horde.org
Tue Feb 21 23:30:25 UTC 2017


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/14581
------------------------------------------------------------------------------
  Ticket             | 14581
  Updated By         | Michael Rubinsky <mrubinsk at horde.org>
  Summary            | Array operation on non-array throws warnings - fix
                     | available
  Queue              | Horde Base
  Version            | Git master
  Type               | Bug
-State              | Feedback
+State              | Assigned
  Priority           | 1. Low
  Milestone          |
  Patch              | 1
-Owners             |
+Owners             | Michael Rubinsky
------------------------------------------------------------------------------


Michael Rubinsky <mrubinsk at horde.org> (2017-02-21 23:30) wrote:

>>> Do you have any custom {app}/config/menu.php files?
>>
>> Yes for wicked. But currently it does not work, the links are not displayed.
>> I'm on the road, will post the content later.
>>
>> Thanks,
>> Torben
>>
>
> This is my horde/wicked/config/menu.php :
>
>
> <?php
> /*
>  * This file lets you extend Wicked's menu with your own items.
>  *
>  * To add a new menu item, simply add a new entry to the $_menu array.
>  * Valid attributes for a new menu item are:
>  *
>  *  'url'       The URL value for the menu item.
>  *  'text'      The text to accompany the menu item.
>  *
>  * These attributes are optional:
>  *
>  *  'icon'      The filename of an icon to use for the menu item.
>  *  'icon_path' The path to the icon if it doesn't exist in the graphics/
>  *              directory.
>  *  'target'    The "target" of the link (e.g. '_top', '_blank').
>  *  'onclick'   Any JavaScript to execute on the "onclick" event.
>  *
>  * Here's an example entry:
>  *
>  *  $_menu[] = array(
>  *      'url' =>        'http://www.example.com/',
>  *      'text' =>       'Example, Inc.',
>  *      'icon' =>       'example.gif',
>  *      'icon_path' =>  'http://www.example.com/images/',
>  *      'target' =>     '_blank',
>  *      'onclick' =>    ''
>  *  );
>  *
>  * You can also add a "separator" (a spacer) between menu items.  To add a
>  * separator, simply add a new string to the $_menu array set to the text
>  * 'separator'.  It should look like this:
>  *
>  *  $_menu[] = 'separator';
>  */
>
> $_menu = array();
>
> /* Add your custom entries below this line. */
>
> $_menu[] = 'separator';

Perfect. This is the culprit. This file instructs to add a string, yet  
the phpdoc of the method that is called to add the menu entry requires  
a string. I guess it makes the most sense to allow an array or a  
string containing 'separator' seeing how these instructions are out in  
the wild...







More information about the bugs mailing list