Opened 7 years ago
Last modified 6 years ago
#44461 new defect (bug)
inconsistent type for global $blog_id
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.9.6 |
Component: | Networks and Sites | Keywords: | needs-testing |
Focuses: | Cc: |
Description
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.
Change History (3)
Note: See
TracTickets for help on using
tickets.
I tested by
echo
-ing blog_id in both single and multisite. Both cases it returned me integer.On single site
get_current_blog_id()
returned 1, and the same is 5 when I did it on a multisite environment.If this is not correct please let me know the exact steps for reproducing the issue.
Thank you!