• Howdy!

    Great plugin!

    But: After installing another popular plugin (Da Reactions) two warnings show at the top of every WordPress backend page… which is quite disturbing… (The plugins seems to work fine though.)

    #1:

    Warning: Array to string conversion in /…/wp-content/plugins/admin-menu-editor/includes/menu-item.php on line 54

    Line 54:

    'page_title'   => (isset($item[3]) ? strval($item[3]) : ''),

    #2:

    Warning: Undefined array key “page” in /…/wp-content/plugins/da-reactions/classes/DaReactions/Admin.php on line 310

    Line 310:

    'screen_name'   => filter_var( $_GET["page"], 

    I’m not capable to see the problem… But maybe the warnings are related? Could you maybe tell me how to fix it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Janis Elsts

    (@whiteshadow)

    The first warning happens because of this: when Da Reactions creates the “Reactions -> Help” menu item, it sets the page title to an array instead of a string (in other words, text). The title should always be text. Admin Menu Editor then tries to convert the title to a string and triggers the warning in the process.

    This is relatively harmless (the menu still works), but I’ll add a small workaround in the next plugin to avoid triggering warnings like this when other plugins provide invalid page titles for menu items.

    The second warning seems unrelated. Based on some quick testing, that warning shows up even when Admin Menu Editor is not activated, so it’s probably not related to this plugin.

    Thread Starter joxyzan

    (@joxyzhan)

    Thank your for a very quick and clear response! ??

    I’ll wait for your update to get rid of the first warning and contact Da Reactions about the second warning.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Warning: Array to string conversion’ is closed to new replies.