Skip to content

Commit

Permalink
Skip empty proxy code
Browse files Browse the repository at this point in the history
  • Loading branch information
olvlvl authored and nicolas-grekas committed Oct 20, 2018
1 parent bc5e7d8 commit 8b7508c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Dumper/PhpDumper.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ private function addProxyClasses()
$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);
Expand Down

0 comments on commit 8b7508c

Please sign in to comment.