Title: Issues: Undefined variable $topic_ID // Undefined array key
Last modified: January 1, 2025

---

# Issues: Undefined variable $topic_ID // Undefined array key

 *  [Toengel](https://wordpress.org/support/users/toengel/)
 * (@toengel)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/issues-undefined-variable-topic_id-undefined-array-key/)
 * Hi,
 * I found 2 issues im my log:
 * `[30-Dec-2024 10:33:09 UTC] PHP Warning: Undefined variable $topic_ID in /wp-
   content/plugins/bbpress-post-topics/index.php on line 469`
 * and
 * `[15-Dec-2024 14:32:59 UTC] PHP Warning: Undefined array key "copy_comments" 
   in /wp-content/plugins/bbpress-post-topics/index.php on line 443`
 * Any idea?
 * Toengel@Alex
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fissues-undefined-variable-topic_id-undefined-array-key%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [Toengel](https://wordpress.org/support/users/toengel/)
 * (@toengel)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/issues-undefined-variable-topic_id-undefined-array-key/#post-18238582)
 * Hi,
 * it seems, that after line 248 the following line is missing:
 *     ```wp-block-code
       $bbppt_options ['copy_comments']=(!empty ($_POST['bbpress_topic']['copy_comments']) ? sanitize_text_field ($_POST['bbpress_topic']['copy_comments']) : '');
       ```
   
 * Toengel@Alex
 *  Plugin Author [Robin W](https://wordpress.org/support/users/robin-w/)
 * (@robin-w)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/issues-undefined-variable-topic_id-undefined-array-key/#post-18239465)
 * Thanks for your helpful posts
 * Does this line fix both issues above?
 * If so, I’ll release a new version
 * Regards
 * Robin
 *  Thread Starter [Toengel](https://wordpress.org/support/users/toengel/)
 * (@toengel)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/issues-undefined-variable-topic_id-undefined-array-key/#post-18240121)
 * Hi,
 * I converted one old post with comments into a bbpress thread… it worked and I
   did not get any log entry…
 * Toengel@Alex

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Issues: Undefined variable $topic_ID // Undefined array key’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bbpress-post-topics.svg)
 * [Post Comments as bbPress Topics](https://wordpress.org/plugins/bbpress-post-topics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bbpress-post-topics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bbpress-post-topics/)
 * [Active Topics](https://wordpress.org/support/plugin/bbpress-post-topics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bbpress-post-topics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bbpress-post-topics/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Toengel](https://wordpress.org/support/users/toengel/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/issues-undefined-variable-topic_id-undefined-array-key/#post-18240121)
 * Status: not resolved