Thanks for the pull-request. I'm not sure if skipping invalid items is the right way to go. In my opinion the developer should be notified in case there is a bug in his code. However, I still need to take a closer look at this to understand exactly what is causing the error.
They are not "invalid items". As I said in the commit message, the syntax of menus allows separators, marked "---". These items should not be normalized, just kept unchanged. That's what my simple fix does.
String offsets are illegal in php 5.4 (but were valid and casted to int in php 5.3). So there need to be another syntax for '---' and any inline html code in the navbar and possibly any other element.
Non-numeric string offsets - e.g. $a['foo'] where $a is a string - now return false on isset() and true on empty(), and produce a E_WARNING if you try to use them. Offsets of types double, bool and null produce a E_NOTICE. Numeric strings (e.g. $a['2']) still work as before. Note that offsets like '12.3' and '5 foobar' are considered non-numeric and produce a E_WARNING, but are converted to 12 and 5 respectively, for backward compatibility reasons. Note: Following code returns different result. $str='abc';var_dump(isset($str['x'])); // false for PHP 5.4 or later, but true for 5.3 or less
Converting an array to a string will now generate an E_NOTICE level error, but the result of the cast will still be the string "Array".