[Solved] Notice: Undefined variable: topicURL  

Page 2 / 2

maccast
Posts: 7
Customer
(@maccast)
Member
Joined: 1 year ago

I'm getting the following error in the "Blog to Forum Cross Posting" box when editing a post:

Notice: Undefined variable: topicURL in /var/www/bbm/mydomain.comhtdocs/wp-content/plugins/wpforo-cross-posting/wpForoCrossPosting.php on line 102 

Screen Shot 2018 04 11 at 9.19.39 PM

In reviewing the code it looks like the bug is because this post existed prior to the installation of WpForo and so when it calls `get_meta` to set `$topicID` it gets set to blank. Then the `if($topicID)` on line 101 fails and `$topicURL` never gets set.

A possible fix would be to change the `if ($topicID)` statement on line 102 to `if ( !empty($topicID) )`

7 Replies
Marcos
Posts: 53
Customer
(@studio500)
Member
Joined: 2 years ago

Error cleared.

Thank you

Reply
Page 2 / 2
Share: