Skip to content

Commit

Permalink
Fix "strspn(): Argument #3 ($offset) must be contained..."
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Oct 9, 2020
1 parent 80842b6 commit 414286a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ YAML for XP Framework ChangeLog

## ?.?.? / ????-??-??

## 6.0.1 / 2020-10-09

* Fixed *strspn(): Argument #3 ($offset) must be contained...* warning
(@thekid)

## 6.0.0 / 2020-04-10

* Implemented xp-framework/rfc#334: Drop PHP 5.6:
Expand Down
3 changes: 2 additions & 1 deletion src/main/php/org/yaml/Input.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,9 @@ private function token($in, &$offset, $end= '#') {
$p= strcspn($in, ' ', $offset);
$tag= substr($in, $offset + 2, $p - 2);
$offset+= $p + 1;
if ($offset >= $l) return [$tag, null];
$token= $this->token($in, $offset, $end);
return [$tag, null === $token ? null : $token[1]];
return [$tag, $token[1]];
} else {
$p= strcspn($in, $end, $offset);
$literal= trim(substr($in, $offset, $p));
Expand Down

0 comments on commit 414286a

Please sign in to comment.