Plugin Directory

Changeset 946538


Ignore:
Timestamp:
07/10/2014 09:22:26 PM (12 years ago)
Author:
sutherlandboswell
Message:

Fixed bug causing API errors to be cached

Location:
foursquare-venue
Files:
2 deleted
2 edited
6 copied

Legend:

Unmodified
Added
Removed
  • foursquare-venue/tags/3.0.1/foursquare-venue.php

    r946349 r946538  
    66Author: Sutherland Boswell
    77Author URI: http://sutherlandboswell.com
    8 Version: 3.0
     8Version: 3.0.1
    99License: GPL2
    1010*/
     
    2727// Define
    2828define( 'FOURSQUARE_VENUE_PATH', dirname(__FILE__) );
    29 define( 'FOURSQUARE_VENUE_VERSION', '3.0' );
     29define( 'FOURSQUARE_VENUE_VERSION', '3.0.1' );
    3030
    3131// Includes
     
    251251            } else {
    252252                $data = json_decode( $response['body'] );
    253                 $data = $data->response->venue;
    254                 set_transient( $transient_name, $data, 15 * 60 );
     253                if ( $data->meta->code != 200 ) {
     254                    $data = new WP_Error( 'foursquare_api_error', $data->meta->errorDetail );
     255                } else {
     256                    $data = $data->response->venue;
     257                    set_transient( $transient_name, $data, 15 * 60 );
     258                }
    255259            }
    256260        }
  • foursquare-venue/tags/3.0.1/readme.txt

    r946349 r946538  
    55Requires at least: 3.5
    66Tested up to: 3.9.1
    7 Stable tag: 3.0
     7Stable tag: 3.0.1
    88
    99Foursquare Venue is a simple but powerful plugin for displaying any venue's Foursquare stats.
     
    4444
    4545== Changelog ==
     46
     47= 3.0.1 =
     48* Fixed bug causing Foursquare errors to be cached
    4649
    4750= 3.0 =
  • foursquare-venue/trunk/foursquare-venue.php

    r946349 r946538  
    66Author: Sutherland Boswell
    77Author URI: http://sutherlandboswell.com
    8 Version: 3.0
     8Version: 3.0.1
    99License: GPL2
    1010*/
     
    2727// Define
    2828define( 'FOURSQUARE_VENUE_PATH', dirname(__FILE__) );
    29 define( 'FOURSQUARE_VENUE_VERSION', '3.0' );
     29define( 'FOURSQUARE_VENUE_VERSION', '3.0.1' );
    3030
    3131// Includes
     
    251251            } else {
    252252                $data = json_decode( $response['body'] );
    253                 $data = $data->response->venue;
    254                 set_transient( $transient_name, $data, 15 * 60 );
     253                if ( $data->meta->code != 200 ) {
     254                    $data = new WP_Error( 'foursquare_api_error', $data->meta->errorDetail );
     255                } else {
     256                    $data = $data->response->venue;
     257                    set_transient( $transient_name, $data, 15 * 60 );
     258                }
    255259            }
    256260        }
  • foursquare-venue/trunk/readme.txt

    r946349 r946538  
    55Requires at least: 3.5
    66Tested up to: 3.9.1
    7 Stable tag: 3.0
     7Stable tag: 3.0.1
    88
    99Foursquare Venue is a simple but powerful plugin for displaying any venue's Foursquare stats.
     
    4444
    4545== Changelog ==
     46
     47= 3.0.1 =
     48* Fixed bug causing Foursquare errors to be cached
    4649
    4750= 3.0 =
Note: See TracChangeset for help on using the changeset viewer.