[wp-trac] [WordPress Trac] #44461: inconsistent type for global $blog_id

WordPress Trac noreply at wordpress.org
Mon Jun 25 18:51:00 UTC 2018


#44461: inconsistent type for global $blog_id
--------------------------+-----------------------------
 Reporter:  jmlapam       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.9.6
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi,

 in a single installation global $blog_id is 1, its type is integer.
 in a multisite context global $blog_id is a string, this might be a
 problem considering the fact that operator == && != have been deprecated.

 There is a function called get_current_blog_id() that basically applies an
 absint() on this global but I guess this should be an integer whatever
 happens.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/44461>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list