Changes between Initial Version and Version 2 of Ticket #3125
- Timestamp:
- 07/05/2017 09:20:37 PM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #3125
- Property Cc contato@… added
- Property Keywords needs-patch needs-unit-tests added
-
Property
Summary
changed from
bbp_get_topic_id might incorrectly give back a reply_id or forum_id
to`bbp_get_topic_id()` might incorrectly return a reply_id or forum_id
-
Ticket #3125 – Description
initial v2 1 Calling the bbp_get_topic_id($id) function will check if $id is a valid number by using ( ! empty( $topic_id ) && is_numeric( $topic_id ) ).2 If function bbp_get_topic_id is called with a forum_id or a reply_id, it will still accept the value.1 Calling the `bbp_get_topic_id()` function will check if $id is a valid number by using `( ! empty( $topic_id ) && is_numeric( $topic_id ) )`. 2 If function `bbp_get_topic_id()` is called with a `forum_id` or a `reply_id`, it will still accept the value. 3 3 4 4 This behaviour should be changed, but there might be 2 ways: … … 7 7 2) if $id is an ID for a reply, return the corresponding ID for the topic this reply is part of (ID crawling) 8 8 9 Regardless of cho sing 1) or 2) apply the same logic to bbp_get_forum_id and bbp_get_reply_id.9 Regardless of choosing 1) or 2) apply the same logic to `bbp_get_forum_id()` and `bbp_get_reply_id()`.