From e46867b1348cd22659315da34fd1405c0b89e75b Mon Sep 17 00:00:00 2001 From: origami11 Date: Mon, 2 Oct 2017 14:16:49 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=BE=D1=88?= =?UTF-8?q?=D0=B8=D0=B1=D0=BA=D0=B8=20=D0=B5=D1=81=D0=BB=D0=B8=20=D0=BD?= =?UTF-8?q?=D0=B5=20=D0=BE=D1=82=D0=BA=D1=80=D1=8B=D0=B2=D0=B0=D0=B5=D1=82?= =?UTF-8?q?=D1=81=D1=8F=20=D1=84=D0=B0=D0=B9=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Excel/Document.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Excel/Document.php b/src/Excel/Document.php index e46ff31..365dba3 100644 --- a/src/Excel/Document.php +++ b/src/Excel/Document.php @@ -76,7 +76,9 @@ class Excel_Document { function save($filename) { $doc = new XMLWriter(); - $doc->openURI($filename); + if (!$doc->openURI($filename)) { + throw new Exception("unknown file " . $filename); + } $doc->setIndent(false); $doc->startDocument('1.0','utf-8'); $doc->startElement('Workbook');