• Hi,

    I have a main issue here. My site has a plugin to allow the users to login with their linkedin, twitter and facebook accounts. At this point only the linkedin one is activated.

    Once i activated your plugin, I got an error on the linkedin one: Fatal error: Cannot redeclare class OAuthException.

    It seems both declare the same class, but i’m not sure on what can i do here to solve it. So i decided to write you as you had more experience.

    Thanks!

    https://www.ads-software.com/extend/plugins/oauth-twitter-feed-for-developers/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter amatoro

    (@amatoro)

    Also it seems there are several classes that get redeclared. So not sure what to do here…

    Cannot redeclare class OAuthSignatureMethod_HMAC_SHA1

    So i wonder how can i use only one oauth file for the two plugins.

    Thanks!

    Plugin Author Liam Gladdy

    (@lgladdy)

    This is a conflict with another plugin! We’re going to abstract our OAuth library to prevent this happening in the future in the next release!

    Hey,

    I am also getting this error message! Is there a quick fix?

    Appreciate the work btw you have some major downloads on this plugin!

    Fatal error: Cannot redeclare class OAuthException in /home/sites/blahblah.com/public_html/wp-content/plugins/oauth-twitter-feed-for-developers/oauth/OAuth.php on line 8

    You need to update OAuth.php which can be found here https://github.com/abraham/twitteroauth/tree/master/twitteroauth

    or simply change OAuth.php

    class OAuthException extends Exception {
        // pass
      }

    to

    if (!class_exists('OAuthException')) {
      class OAuthException extends Exception {
        // pass
      }
    }
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Fatal error: Cannot redeclare class OAuthException’ is closed to new replies.