Fixed php warning if html options are used for navlist header item

This issue also exists in the master branch in the method of the same name.
Should I create a separate pull request for the master branch?