zendframework / zend-code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

"newLine" Bug in MethodGenerator class

finalJustize opened this issue · comments

The static function {{Zend\Code\Generator\MethodGenerator::clearBodyIndention}} fails on Windows 10, php 7.1. in line 83: $lines = explode(PHP_EOL, $body);
$body does not contain any PHP_EOL (\n\r) characters, no matter what line ending encoding the source content had before.
works well on Linux, OSX.

quick fix:
change line 83 to
$lines = explode("\n", $body);

This repository has been closed and moved to laminas/laminas-code; a new issue has been opened at laminas/laminas-code#13.