Title: Bugfix: redirect-parameter set wrong in link-button-href
Last modified: August 20, 2016

---

# Bugfix: redirect-parameter set wrong in link-button-href

 *  Resolved [renet](https://wordpress.org/support/users/renet/)
 * (@renet)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/bugfix-redirect-parameter-set-wrong-in-link-button-href/)
 * Hey there,
 * I think I found a bug in your plugin: If my blog can be reached under `http://
   example.com/wordpress`, the redirect-parameter of your link-button href-attribute
   points to `http://example.com/wordpress/wordpress...`
 * The line 465 in nextend-twitter-connect.php contains the bug:
    `return '<a href
   ="'.new_twitter_login_url().'&redirect='.site_url().$GLOBALS['HTTP_SERVER_VARS']['
   REQUEST_URI'].'">'.$new_twitter_settings['twitter_link_button'].'</a>';`
 * I added the following function:
 *     ```
       function curPageURL() {
        $pageURL = 'http';
        if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
        $pageURL .= "://";
        if ($_SERVER["SERVER_PORT"] != "80") {
         $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
        } else {
         $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
        }
        return $pageURL;
       }
       ```
   
 * and replaced the line 465 with this one:
    `return '<a href="'.new_twitter_login_url().'&
   redirect='.curPageURL().'">'.$new_twitter_settings['twitter_link_button'].'</
   a>';`
 * Now everything works fine. 🙂 Can you please fix this in your plugin? Thanks!
 * [http://wordpress.org/extend/plugins/nextend-twitter-connect/](http://wordpress.org/extend/plugins/nextend-twitter-connect/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Nextendweb](https://wordpress.org/support/users/nextendweb/)
 * (@nextendweb)
 * [13 years, 4 months ago](https://wordpress.org/support/topic/bugfix-redirect-parameter-set-wrong-in-link-button-href/#post-3363593)
 * Thank you! I have added it in version 1.4.41

Viewing 1 replies (of 1 total)

The topic ‘Bugfix: redirect-parameter set wrong in link-button-href’ is closed to
new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/nextend-twitter-connect_7f8678.svg)
 * [Nextend Twitter Connect](https://wordpress.org/plugins/nextend-twitter-connect/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextend-twitter-connect/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextend-twitter-connect/)
 * [Active Topics](https://wordpress.org/support/plugin/nextend-twitter-connect/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextend-twitter-connect/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextend-twitter-connect/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Nextendweb](https://wordpress.org/support/users/nextendweb/)
 * Last activity: [13 years, 4 months ago](https://wordpress.org/support/topic/bugfix-redirect-parameter-set-wrong-in-link-button-href/#post-3363593)
 * Status: resolved