PhpMetrics: svg graphs broken in v1.8.3

installed latest version. ran phpmetrics from the command line overcame memory limit problem from #188 by doubling memory to 1024M. Chrome reports javascript errors. Ditto in Firefox and Safari phpmetrics_report_-_by_jean-francois_lepine

line 1618 begins

d3=function(){function n(n)

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 22 (13 by maintainers)

Commits related to this issue

Most upvoted comments

It was really hard, but I found the bug \o/

The bug does not concern Twig but the use of Symfony\Component\Console\Output\StreamOutput component (this component uses streams, with fwrite() and fflush() functions)

Way to reproduce:

use Symfony\Component\Console\Output\StreamOutput;

$filename = '/tmp/log.txt';
$content = 'hello<<1world';
$handle = fopen($filename, 'w');
$stream = new StreamOutput($handle);
$stream->write($content);
fclose($handle);

var_dump($content);
var_dump(file_get_contents($filename));

// string(13) "hello<<1world"
// string(12) "hello\1world"

I can solve this issue using the file_put_contents() function, but before I want understand : why this bug occurs ?