Open albeda1 opened 3 years ago
To reproduce the issue, try to generate two xlsx files, like :
$zipper1 = new \ZipArchive; $file1 = DIR . '/file1.xlsx'; $zipper1->open( $file1, \ZipArchive::CREATE | \ZipArchive::OVERWRITE ); $builder1 = new XlsxBuilder( $zipper1 ); $builder1->add_rows( $FirstDataArray ); $builder1->build(); $zipper1->close();
(tried here to unset $builder and $zipper, but with no success)
$zipper2 = new \ZipArchive; $file2 = DIR . '/file2.xlsx'; $zipper2->open( $file2, \ZipArchive::CREATE | \ZipArchive::OVERWRITE ); $builder2 = new XlsxBuilder( $zipper2 ); $builder2->add_rows( $SecondDataArray ); $builder2->build(); $zipper2->close();
Both files are generated. First file is ok.. second, it's garbled. With the same code, If the first block is commented, second file become perfect.
I cannot find the leak....
To reproduce the issue, try to generate two xlsx files, like :
$zipper1 = new \ZipArchive; $file1 = DIR . '/file1.xlsx'; $zipper1->open( $file1, \ZipArchive::CREATE | \ZipArchive::OVERWRITE ); $builder1 = new XlsxBuilder( $zipper1 ); $builder1->add_rows( $FirstDataArray ); $builder1->build(); $zipper1->close();
(tried here to unset $builder and $zipper, but with no success)
$zipper2 = new \ZipArchive; $file2 = DIR . '/file2.xlsx'; $zipper2->open( $file2, \ZipArchive::CREATE | \ZipArchive::OVERWRITE ); $builder2 = new XlsxBuilder( $zipper2 ); $builder2->add_rows( $SecondDataArray ); $builder2->build(); $zipper2->close();
Both files are generated. First file is ok.. second, it's garbled. With the same code, If the first block is commented, second file become perfect.
I cannot find the leak....