diff --git a/lib/Doctrine/ORM/Tools/EntityGenerator.php b/lib/Doctrine/ORM/Tools/EntityGenerator.php index 550cc5a3a..a2b8b41b5 100644 --- a/lib/Doctrine/ORM/Tools/EntityGenerator.php +++ b/lib/Doctrine/ORM/Tools/EntityGenerator.php @@ -1207,7 +1207,9 @@ public function __construct() $lines = explode("\n", $code); foreach ($lines as $key => $value) { - $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; + if (!empty($value)) { + $lines[$key] = str_repeat($this->spaces, $num) . $lines[$key]; + } } return implode("\n", $lines);