You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
…encountered in /www/xxxx/Parser.php:450 "
The exception is not thrown by yaml itself but by PHP because this line in Parser.captureSegment():
result += _result;
Gets naively compiled in PHP (result is a Dynamic).
So I propose to change it to:
result += Std.string(_result);
Stack trace:
#0 /www/xxx/lib/yaml/Parser.php(450): php\Boot::php\{closure}()
mikestead#1 /www/xxx/lib/yaml/Parser.php(2284): yaml\Parser->captureSegment()
mikestead#2 /www/xxx/lib/yaml/Parser.php(574): yaml\Parser->readPlainScalar()
mikestead#3 /www/xxx/lib/yaml/Parser.php(1169): yaml\Parser->composeNode()
mikestead#4 /www/xxx/lib/yaml/Parser.php(553): yaml\Parser->readBlockMapping()
mikestead#5 /www/xxx/lib/yaml/Parser.php(1757): yaml\Parser->composeNode()
mikestead#6 /www/xxx/lib/yaml/Parser.php(991): yaml\Parser->readDocument()
mikestead#7 /www/xxx/lib/yaml/Parser.php(812): yaml\Parser->parseAll()
mikestead#8 /www/xxx/lib/yaml/Yaml.php(33): yaml\Parser->parse()
mikestead#9 /www/xxx/lib/yaml/Yaml.php(49): yaml\Yaml::parse()
Note the implicit conversion of any scalar not
true
orfalse
to boolean has thankfully been dropped in YAML 1.2.http://www.yaml.org/spec/1.2/spec.html#id2803629
The link at http://yaml.org/type/ only applies to YAML 1.1 unfortunately, it'd be great to see it updated someday.
One of the biggest benefits of YAML 1.2 is this change and the fix for exponential notation.
The text was updated successfully, but these errors were encountered: