Browse files

fixed potential wp_error

  • Loading branch information...
1 parent 84dee2d commit 24f0ff756cdfbbc7019b3633853b187e61c3125a Joachim Kudish committed Sep 19, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 updater.php
View
5 updater.php
@@ -84,7 +84,12 @@ function delete_transients() {
function get_new_version() {
$version = get_site_transient($this->config['slug'].'_new_version');
if (!isset($version) || !$version || $version == '') {
+
$raw_response = wp_remote_get($this->config['raw_url'].'/README.md');
+
+ if (is_wp_error($raw_response))
+ return false;
+
$__version = explode('~Current Version:', $raw_response['body']);
$_version = explode('~', $__version[1]);
$version = $_version[0];

0 comments on commit 24f0ff7

Please sign in to comment.