Title: Check for existing classes
Last modified: August 21, 2016

---

# Check for existing classes

 *  Resolved [nielsvanrenselaar](https://wordpress.org/support/users/nielsvanrenselaar/)
 * (@nielsvanrenselaar)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/check-for-existing-classes/)
 * 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/](http://wordpress.org/plugins/oauth-twitter-feed-for-developers/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Liam Gladdy](https://wordpress.org/support/users/lgladdy/)
 * (@lgladdy)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/check-for-existing-classes/#post-4523719)
 * Version 2.2 adds proper compatibility with OAuth or TwitterOAuth being included
   by another plugin, or built into PHP/included by PECL.

Viewing 1 replies (of 1 total)

The topic ‘Check for existing classes’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/oauth-twitter-feed-for-developers.
   svg)
 * [oAuth Twitter Feed for Developers](https://wordpress.org/plugins/oauth-twitter-feed-for-developers/)
 * [Support Threads](https://wordpress.org/support/plugin/oauth-twitter-feed-for-developers/)
 * [Active Topics](https://wordpress.org/support/plugin/oauth-twitter-feed-for-developers/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/oauth-twitter-feed-for-developers/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/oauth-twitter-feed-for-developers/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Liam Gladdy](https://wordpress.org/support/users/lgladdy/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/check-for-existing-classes/#post-4523719)
 * Status: resolved