Skip to content

Develop branch template not saving? #238

@ozilion

Description

@ozilion

Using template cant save it and it stop at line that it should throw an excepted but there is no any thrown exception

public function save()
{
    foreach ($this->headerXMLs as $index => $headerXML) {
        $this->zipClass->addFromString($this->getHeaderName($index), $this->headerXMLs[$index]);
    }

    $this->zipClass->addFromString('word/document.xml', $this->documentXML);

    foreach ($this->footerXMLs as $index => $headerXML) {
        $this->zipClass->addFromString($this->getFooterName($index), $this->footerXMLs[$index]);
    }

    // Close zip file
    if ($this->zipClass->close() === false) {
      echo "save ok 1<br>"; // I can see written "save ok 1" on my browser
        throw new Exception('Could not close zip file.'); // this line is not working and can't pass to next line
      echo "save ok 2<br>"; // can't get to here
    }
      echo "save ok 3<br>";

    return $this->tempFileName;
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions