ZF-6544: duplicated new lines characters when calling Zend_Reflection_Method::getBody()
When I run zf.sh to add a new action to an existing controller, I saw it added extra new line characters to my existing methods. Trying to figure out how to solve it, I saw the cause was in Zend_Reflection_Method::getBody().
Making a call to file(), returns a array with a line (included "\n") for each index. So, in the getBody() return statment, the implode ("\n", $lines) adds an extra "\n" character. I solve it in local replacing: file($this->getDeclaringClass()->getFileName())
for file($this->getDeclaringClass()->getFileName(), FILE_IGNORE_NEW_LINES)
Now it works fine for me.
I'm running zf 1.8.0 and Zend Core under Kubuntu 9.04