Opened 8 years ago
Closed 8 years ago
#3059 closed enhancement (fixed)
Non-numeric value issue
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | normal |
Severity: | major | Version: | |
Component: | Tools - Code Improvements | Keywords: | commit |
Cc: |
Description
Version 2.6-beta-2
“Warning: A non-numeric value encountered in . . . /wp-content/plugins/bbpress/includes/forums/template.php on line 1441”
Here is line 1441 $retval = $replies + $topics;
http://www.sndg.org/2017/forums/
This kind of thing is out of my knowledge base. Is it something I did, or a bad line in the install?
Change History (14)
#2
@
8 years ago
There are improvements to make here, but... bbp_get_forum_topic_count()
should always at least return an int
value, and it appears like it works correctly in all cases.
I looked at _bbp_total_reply_count
and _bbp_total_topic_count
meta-data updates, and everything gets stored as an integer, so there isn't a case where a number-formatted value is getting passed around.
#4
@
8 years ago
- Component changed from Tools - Warnings/Notices to Tools - Code Improvements
- Keywords commit added
- Milestone changed from Awaiting Review to 2.6
- Priority changed from high to normal
- Type changed from defect to enhancement
#8
@
8 years ago
I wish any of the above made sense to me. What I know is that I still have the same problem.
http://www.sndg.org/2017/forums/ please see warning on this page.
#9
@
8 years ago
@padrenola We haven't pushed any updated beta releases yet. Are you keeping up with trunk on your own? If so, it might be easiest if I could somehow see your installation directly (if you're comfortable with that.)
This ticket was mentioned in Slack in #bbpress by thebrandonallen. View the logs.
8 years ago
#11
@
8 years ago
@padrenola The issue you are seeing is related to how X Theme adds styling to forum topic|reply|post counts. They are filtering on all iterations of bbp_get_forum_{type}_count
and bbp_get_forum_{type}_count_int
, and returning the count wrapped in a span element.
This is fine for the non-integer counts, but causes the issue you are seeing when applying the same logic to the filters with the _int
suffix.
I am using 2.6-beta-2 because the 2.6 version that is promoted in my X Theme bundle lacks any functional links/tabs in the WordPress Dashboard after install.
X Theme version 4.6.4
WordPress version 4.7.2