Function passes a null parameter
-
Hello all.
I’ve been editing the bbPress 2.6.5 plugin a bit, in order to fit my use.As of now, I just wanna track down the topic_id and the author_id.
That’s pretty simple, given the set of functions available for the community.So I managed to write this little code here:
global $author_id; global $id_of_topic; $id_of_topic = bbp_get_topic_id(); $author_id = bbp_get_topic_author_id($id_of_topic);
The ID of the Topic is successfully retrieved, let’s say it’s “18446744073709551615”,
but once I pass that variable to bbp_get_topic_author_id(), the output of $author_id is 0.Now that’s pretty weird considering that if I pass the number 18446744073709551615 directly into that function, everything goes fine, I retrieve the author_id successfully.
One thing I noticed tho, is that printing out $id_of_topic, once with %d and once with %u (just after I call bbp_get_topic_id() ), I get two different values.
– %d = 0
– %u = 18446744073709551615Pretty weird.. How can I somehow pass the %u to bbp_get_topic_author_id()?
Thanks in advance! 🙂
- You must be logged in to reply to this topic.