This is a fix for YAML error from issue #8093

I have problems at the moments setting up PHPUnit testing environment, so any help with testing it would be appreciated.