Windows newline in annotation block throws exception
If a class annotation contains Windows newline character instead of the expected UNIX version, FLOW3 will quit with an Uncaught Exception.
Because of this a fresh clone from /FLOW3/Distributions/Base.git might fail under some circumstances (Windows and git config "core.autocrlf = true"). This can be avoided with a correct git configuration, which is now documented in the wiki ( http://forge.typo3.org/projects/flow3/wiki/Installation_hints8 ). An example exception thrown by this configuration can be found here: http://pastebin.de/raw/?id=19666 and the bug under http://forge.typo3.org/issues/31087 is related to this issue.
The expected behavior is FLOW3 working with Windows new-line in annotations block.
PS: Thx to the #flow3 IRC channel and afoeder for figuring this out.
Updated by Christof Rodejohann almost 10 years ago
Having trouble with my git environment, so i can't push the patch. The solution is a one-line change in
In Line 50, the $line has to be stripped of all newline characters. Adding the following line there will fix the bug:
$line = str_replace(array("\r\n", "\n", "\r"), "", $line);