diff --git a/Inline.php b/Inline.php index 58d38986..f780a26e 100644 --- a/Inline.php +++ b/Inline.php @@ -569,7 +569,7 @@ private static function evaluateScalar(string $scalar, int $flags, array &$refer } // an unquoted * - if (false === $value || '' === $value) { + if ('' === $value) { throw new ParseException('A reference must contain at least one character.', self::$parsedLineNumber + 1, $value, self::$parsedFilename); } @@ -594,7 +594,7 @@ private static function evaluateScalar(string $scalar, int $flags, array &$refer case '!' === $scalar[0]: switch (true) { case str_starts_with($scalar, '!!str '): - $s = (string) substr($scalar, 6); + $s = substr($scalar, 6); if (\in_array($s[0] ?? '', ['"', "'"], true)) { $isQuotedString = true;