From 89e88499571915621466c432a8a75a76b476a2a3 Mon Sep 17 00:00:00 2001 From: Adrien Foulon <6115458+Tofandel@users.noreply.github.com> Date: Sun, 23 Sep 2018 16:47:42 +0200 Subject: [PATCH] Fix PHP notice "Undefined offset: 1 in readme-parser.php on line 124". The for loop was iterating including the count index of the $_sections, it should be excluding --- vendor/readme-parser.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vendor/readme-parser.php b/vendor/readme-parser.php index 00a53bb..d69c051 100644 --- a/vendor/readme-parser.php +++ b/vendor/readme-parser.php @@ -121,7 +121,7 @@ class PucReadmeParser { $_sections = preg_split('/^[\s]*==[\s]*(.+?)[\s]*==/m', $file_contents, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY); $sections = array(); - for ( $i=1; $i <= count($_sections); $i +=2 ) { + for ( $i=1; $i < count($_sections); $i +=2 ) { $_sections[$i] = preg_replace('/(^[\s]*)=[\s]+(.+?)[\s]+=/m', '$1