WordPress.org

Forums

oAuth Twitter Feed for Developers
[resolved] Check for existing classes (2 posts)

  1. Niels van Renselaar
    Member
    Posted 1 year ago #

    in oauth/OAuth.php you should check if classes are already decleared, because OAuth is pretty generic and widely used; or you should prepend it with a prefix.

    <?php
    
    /* Generic exception class
    */
    
    if( !class_exists("OAuthException") ) {
    	class OAuthException extends Exception {
    	  // pass
    	}
    }
    
    ?>

    This solved the problem:

    Fatal error: Cannot redeclare class OAuthException in /home/bemore/domains/be-more.nl/public_html/wordpress/wp-content/plugins/oauth-twitter-feed-for-developers/oauth/OAuth.php on line 8

    http://wordpress.org/plugins/oauth-twitter-feed-for-developers/

  2. Liam Gladdy
    Member
    Plugin Author

    Posted 1 year ago #

    Version 2.2 adds proper compatibility with OAuth or TwitterOAuth being included by another plugin, or built into PHP/included by PECL.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • oAuth Twitter Feed for Developers
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.