Bug `Neos.Fusion:Match` with `@default = ${null}`
#3,630 建立於 2022年3月2日
倉庫指標
- 星標
- (267 顆星)
- PR 合併指標
- (PR 指標待抓取)
描述
The MatchImplementation doesnt allow to use a default of the actual php null. It assumes it gets null because the fusion path was not found. Instead we would need to check the runtime last evaluation status.
steps to reproduce:
run:
root = Neos.Fusion:Match {
@subject = ${'abc'}
@default = ${null}
}
expect:
null as result (eg. no result to see)
actual:
Unhandled match Exception
More:
Php 8 match allows a default of null, so we should allow it too.
Same also for matching paths like when 'abc' was defined but set to null, it would continue on to the default, as it thinks null was returned because the path is not defined.
When testing this, use an eel null instead of fusion null, as foo = null is omited while parsing
Neos since introduction of matcher
A super hacky idea: __eelExpression => "null"