[wp-trac] [WordPress Trac] #50796: Call to a member function add_node() on string

WordPress Trac noreply at wordpress.org
Thu Mar 25 16:58:07 UTC 2021


#50796: Call to a member function add_node() on string
-------------------------------------------+------------------------------
 Reporter:  malthert                       |       Owner:  (none)
     Type:  enhancement                    |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Toolbar                        |     Version:  5.4.2
 Severity:  normal                         |  Resolution:
 Keywords:  reporter-feedback 2nd-opinion  |     Focuses:
-------------------------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:   => reporter-feedback 2nd-opinion
 * type:  defect (bug) => enhancement


Comment:

 Another ticket about adding error handling (for a different error) was
 closed as won't-fix: #51894.

 @malthert To move forward with this ticket:

 1. Could you give example code that would create this error?
 2. My idea for fixing involves starting each function that uses
 `$wp_admin_bar` with a type check (and maybe ending the function there if
 it's not an object). Would that work and/or is there a better way?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50796#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list