jtsternberg / DsgnWrks-Instagram-Importer

Backup your instagram photos & display your instagram archive. Supports importing to custom post-types & adding custom taxonomies.
http://wordpress.org/extend/plugins/dsgnwrks-instagram-importer/
33 stars 17 forks source link

Emojis in $user_data->bio breaks set_transient in get_cached_user_data #51

Open keskistok opened 5 years ago

keskistok commented 5 years ago

If the bio text of a instagram profile contains emojis it breaks the saving of the "dwinstauser" transient in get_cached_user_data function. This leads to an infinite loop causing the importer to exceeded the maximum number of requests per hour for the Instagram api. We have had this problem on a lot if different environments and servers.

For now I just did the following in our copy of the plugin:

// Bio may have emojis etc that breaks the transient 
$user_data->bio = '';
set_transient( 'dw_instauser_'. $opts['id'], $user_data, WEEK_IN_SECONDS );