properly exit script if no version was detected, for drupal and wordpress (courtesy WvR)
This commit is contained in:
@@ -5,8 +5,12 @@ require_once("toolkit.php");
|
||||
// Retrieve current Wordpress version from http://api.wordpress.org/core/version-check/1.6/
|
||||
//
|
||||
$wp_api = unserialize(file_get_contents("http://api.wordpress.org/core/version-check/1.6/"));
|
||||
$wp_current = $wp_api['offers'][0]['current'];
|
||||
verbose("Current Wordpress version: $wp_current", 1);
|
||||
if( isset($wp_api['offers'][0]['current']) ) {
|
||||
$wp_current = $wp_api['offers'][0]['current'];
|
||||
verbose("Current Wordpress version: $wp_current", 1);
|
||||
} else {
|
||||
die("Unable to determine current Wordpress version, exiting\n");
|
||||
}
|
||||
|
||||
checkHost(null, $wp_current);
|
||||
if( $hosts != null ) {
|
||||
|
||||
Reference in New Issue
Block a user