[wp-trac] [WordPress Trac] #30566: Fix "Trying to get property of non-object" notice when calling get_blogaddress_by_id() with an invalid id.

WordPress Trac noreply at wordpress.org
Mon Dec 1 22:24:25 UTC 2014


#30566: Fix "Trying to get property of non-object" notice when calling
get_blogaddress_by_id() with an invalid id.
--------------------------------+------------------------------
 Reporter:  nerrad              |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:  trunk
 Severity:  normal              |  Resolution:
 Keywords:  needs-unit-tests    |     Focuses:  multisite
--------------------------------+------------------------------

Comment (by johnjamesjacoby):

 Replying to [comment:4 nerrad]:
 > Would be even better if the object was not a stdClass object

 Agree, true `WP_Site` and `WP_Network`objects would be ideal. And unit
 tests. :)

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


More information about the wp-trac mailing list