WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Niels van Renselaar
    Member
    Posted 5 months 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 Contributor

    Posted 5 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.