Opened 8 years ago
Last modified 7 years ago
#44461 new defect (bug)
inconsistent type for global $blog_id
| Reported by: | anonymized_10765487 | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Networks and Sites | Version: | 4.9.6 |
| Severity: | normal | Keywords: | needs-testing |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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!