[patch-warnings] fix some warnings when to inexsitant array indexes

@rande before theres two nested foreach, i've removed the first one how iterate section name ;)