[Plugin: WordPress Admin Bar] Unsupported operands on WordPress 3.0-alpha
-
Hi,
I’ve been seeing an error that reads
Unsupported operand types in /home/**********/plugins/wordpress-admin-bar/wordpress-admin-bar.php on line 466
Well, of course I dug in to look at what was on line 466. It’s in the
AddSingleEditLink()function, and apparently adds the ‘Edit This’ link as an item under the appropriate Posts or Pages menu (using an addition sign with arrays — something I’ve never seen before).The curiosity is that WordPress 3.0-alpha has renamed the top-level Pages menu link to
edit.php?post_type=pagefrom its originaledit-pages.php. As a result,$menu['edit-pages.php']doesn’t exist; it has become$menu['edit.php?post_type=page'].The attempt by
AddSingleEditLink()to prepend the ‘Edit This’ link to the non-existent array fails spectacularly with a fatal error. By editing line 464’s reference toedit-pages.phpto becomeedit.php?post_type=page, I was able to fix the problem.I hope this helps anybody else who discovered issues on WordPress 3.0-alpha, and maybe this can make its way into the next release of WordPress Admin Bar.
Regards,
Frederick
The topic ‘[Plugin: WordPress Admin Bar] Unsupported operands on WordPress 3.0-alpha’ is closed to new replies.