Skip empty proxy code

This commit is contained in:
Olivier Laviale 2018-10-14 15:23:03 +02:00 committed by Nicolas Grekas
parent 6a50405483
commit baf6f8cc34
1 changed files with 3 additions and 1 deletions

View File

@ -233,7 +233,9 @@ class PhpDumper extends Dumper
$strip = '' === $this->docStar && method_exists('Symfony\Component\HttpKernel\Kernel', 'stripComments');
foreach ($definitions as $definition) {
$proxyCode = "\n".$this->getProxyDumper()->getProxyCode($definition);
if ("\n" === $proxyCode = "\n".$this->getProxyDumper()->getProxyCode($definition)) {
continue;
}
if ($strip) {
$proxyCode = "<?php\n".$proxyCode;
$proxyCode = substr(Kernel::stripComments($proxyCode), 5);