-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Description
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;
}