2011-11-15, 12:43 PM
2011-11-15, 09:21 PM
(2011-11-14, 08:54 AM)Tomm M Wrote: [ -> ](2011-11-14, 05:36 AM)Aristotle Wrote: [ -> ](2011-11-14, 04:09 AM)Tim B. Wrote: [ -> ]There is indeed a bug in 1.6.5 alpha, I think it occurs when users who have over 1,000 posts edit their signature. It will be fixed by release obviously.
Oddly specific.
Not really that specific. $post['postnum'] is formatted when the signature is checked for a minimum post count and so can't be compared accurately.
Wouldn't you be able to parse it through intval() then? Or am i misunderstanding the way it is formatted? I haven't really looked through that part of the mybb code, so i may be (and probably am) way off
2011-11-15, 11:10 PM
(2011-11-15, 09:21 PM)Booher Wrote: [ -> ](2011-11-14, 08:54 AM)Tomm M Wrote: [ -> ](2011-11-14, 05:36 AM)Aristotle Wrote: [ -> ](2011-11-14, 04:09 AM)Tim B. Wrote: [ -> ]There is indeed a bug in 1.6.5 alpha, I think it occurs when users who have over 1,000 posts edit their signature. It will be fixed by release obviously.
Oddly specific.
Not really that specific. $post['postnum'] is formatted when the signature is checked for a minimum post count and so can't be compared accurately.
Wouldn't you be able to parse it through intval() then? Or am i misunderstanding the way it is formatted? I haven't really looked through that part of the mybb code, so i may be (and probably am) way off
Thats the issue. When passing 1,000 to intval you get 1 because it truncates at the first non-integer character
2011-11-15, 11:46 PM
Why not just use str_replace()? Replace all "," with "" then intval
2011-11-16, 12:13 AM
(2011-11-15, 11:10 PM)Dylan M. Wrote: [ -> ](2011-11-15, 09:21 PM)Booher Wrote: [ -> ](2011-11-14, 08:54 AM)Tomm M Wrote: [ -> ](2011-11-14, 05:36 AM)Aristotle Wrote: [ -> ](2011-11-14, 04:09 AM)Tim B. Wrote: [ -> ]There is indeed a bug in 1.6.5 alpha, I think it occurs when users who have over 1,000 posts edit their signature. It will be fixed by release obviously.
Oddly specific.
Not really that specific. $post['postnum'] is formatted when the signature is checked for a minimum post count and so can't be compared accurately.
Wouldn't you be able to parse it through intval() then? Or am i misunderstanding the way it is formatted? I haven't really looked through that part of the mybb code, so i may be (and probably am) way off
Thats the issue. When passing 1,000 to intval you get 1 because it truncates at the first non-integer character
Ah didn't think of that.
2011-11-16, 12:18 AM
(2011-11-15, 11:46 PM)Tom K. Wrote: [ -> ]Why not just use str_replace()? Replace all "," with "" then intval
We're doing it even more efficient than that
2011-11-16, 12:22 AM
Have something like $post['postcountunformatted']; with a shorter name of course?
2011-11-16, 03:59 AM
(2011-11-16, 12:22 AM)Booher Wrote: [ -> ]Have something like $post['postcountunformatted']; with a shorter name of course?
No, just before we format the $post['postnum'] we assign it to $postnum
2011-11-16, 08:56 PM
Ah, that works too xP
2011-11-17, 08:12 PM
Hmm how strange. I haven't even edited my signature