diff --git a/vendor/readme-parser.php b/vendor/readme-parser.php
index d89a06e..00a53bb 100644
--- a/vendor/readme-parser.php
+++ b/vendor/readme-parser.php
@@ -157,8 +157,11 @@ class PucReadmeParser {
$upgrade_notice = array();
if ( isset($final_sections['upgrade_notice']) ) {
$split = preg_split( '#
(.*?)
#', $final_sections['upgrade_notice'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY );
- for ( $i = 0; $i < count( $split ); $i += 2 )
- $upgrade_notice[$this->sanitize_text( $split[$i] )] = substr( $this->sanitize_text( $split[$i + 1] ), 0, 300 );
+ if ( count($split) >= 2 ) {
+ for ( $i = 0; $i < count( $split ); $i += 2 ) {
+ $upgrade_notice[$this->sanitize_text( $split[$i] )] = substr( $this->sanitize_text( $split[$i + 1] ), 0, 300 );
+ }
+ }
unset( $final_sections['upgrade_notice'] );
}