Check tag body has a value before trying to access it as an string array

This commit is contained in:
Roberto Espinoza
2017-08-08 08:39:58 +02:00
committed by Jaapio
parent 183824db76
commit 4aada1f93c
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ final class StandardTagFactory implements TagFactory
list($tagName, $tagBody) = $this->extractTagParts($tagLine);
if ($tagBody[0] === '[') {
if ($tagBody !== '' && $tagBody[0] === '[') {
throw new \InvalidArgumentException(
'The tag "' . $tagLine . '" does not seem to be wellformed, please check it for errors'
);