Filtering show_post_format_ui and returning false results in a fatal error
|Reported by:||tlovett1||Owned by:||SergeyBiryukov|
|Component:||Post Formats||Keywords:||has-patch commit|
Title says it all. Filtering and returning false results in this error on the post edit screen:
Catchable fatal error: Object of class CLASS_ADDING_FILTER could not be converted to string in /srv/www/trunk/wp-admin/edit-form-advanced.php on line 409
My patch simple declares $post_format_options outside of the if statement. Since the variable was getting checked with empty() and it wasn't initialized, it was passing through the check resulting in a fatal error.