Git Product home page Git Product logo

Comments (4)

bunglegrind avatar bunglegrind commented on August 26, 2024

There are other issues already opened concerning this problem...I have experienced it too...but I've just found the culprit.
There's a bug in https://github.com/PHPOffice/PHPWord/blob/master/src/PhpWord/TemplateProcessor.php

In short, when saving the the file, the zip::close method is invoked two times:

  • the first one in templateprocessor::save

if (false === $this->zipClass->close()) {

  • the second one (and this one generates the warning) in templateprocessor::__deconstruct

$this->zipClass->close();

The bug was introduced in commit 21f71c9

However, I've no idea if commenting the line is the right patch (probably not, even if it's fine for my use case)

@oleibman I see you're the author of that commit, any opinions?

P.S.
I'm using PHP 7.4 (not sure if a Warning is generated or an Exception is thrown with PHP 8...)

from phpword.

oleibman avatar oleibman commented on August 26, 2024

@bunglegrind PR #2554, opened in January, will solve the problem if it is merged.

from phpword.

bunglegrind avatar bunglegrind commented on August 26, 2024

@bunglegrind PR #2554, opened in January, will solve the problem if it is merged.

uh...thanks...there are even more issues. I'll take a look at the PR and possibly comment there.

Is this repository lacking moderators?

from phpword.

oleibman avatar oleibman commented on August 26, 2024

PR #2554 is now merged. You can close this issue, unless, of course, it doesn't fix your problem after all.

from phpword.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.