Permalink
Browse files

Added checks for header response. So on lack of network pluginify wil…

…l work
  • Loading branch information...
1 parent 255ca66 commit fde6678b97796dfa1cc4040ebdd80843a78b63cf @stas committed Sep 14, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 pluginify.php
View
@@ -65,6 +65,7 @@ function error( $code, $args ) {
default:
printf( "Unknown error code %d with arguments: %s.\n", $code, json_encode( $args ) );
}
+
self::help();
}
@@ -122,8 +123,7 @@ function whoami() {
function process( $plugin ) {
$headers = get_headers( "http://plugins.svn.wordpress.org/{$plugin}/" );
-
- if ( $headers['0'] !== 'HTTP/1.1 404 Not Found' ) {
+ if ( $headers && $headers['0'] == 'HTTP/1.1 200 OK' ) {
self::error( 4, $plugin ); // Failure with plugin namespace
return;
}

0 comments on commit fde6678

Please sign in to comment.