Skip to content

Fatal error: Cannot redeclare class OAuthException

24. February 2014

Solution

/immocaster/Oauth/OAuth.php

<?php
    /* Generic exception class
     */

    // schmelzer, 24. Feb. 2014
    // Enclosed class definition by if()
    // To avoid PHP Error. Tested with PHP 5.3/liip.ch
    // --
    // http://wordpress.org/support/topic/fatal-error-cannot-redeclare-class-oauthexception
    // Related to
    // https://github.com/abraham/twitteroauth/blob/master/twitteroauth/OAuth.php

    if (!class_exists('OAuthException')) {
        class OAuthException extends Exception {

            // pass
        }

    }
Advertisements

From → PHP

Leave a Comment

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: