File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed
Classes/PHPPowerPoint/Writer Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff line change 33
33
- Images in Layouts other than first Master Slide within Template file causes corrupted PPTX - @maartenba CP-4596
34
34
- Fixed A3 and A4 formats dimensions - @delphiki GH-16
35
35
- Fixed custom document layout - @delphiki GH-18
36
+ - Filename parameter is required for IWriter::save method
36
37
37
38
### Miscellaneous
38
39
Original file line number Diff line number Diff line change @@ -40,5 +40,5 @@ interface PHPPowerPoint_Writer_IWriter
40
40
* @param string $pFilename
41
41
* @throws Exception
42
42
*/
43
- public function save ($ pFilename = null );
43
+ public function save ($ pFilename );
44
44
}
Original file line number Diff line number Diff line change @@ -102,8 +102,11 @@ public function __construct(PHPPowerPoint $pPHPPowerPoint = null)
102
102
* @param string $pFilename
103
103
* @throws Exception
104
104
*/
105
- public function save ($ pFilename = null )
105
+ public function save ($ pFilename )
106
106
{
107
+ if (empty ($ pFilename )) {
108
+ throw new Exception ("Filename is empty " );
109
+ }
107
110
if (!is_null ($ this ->_presentation )) {
108
111
// If $pFilename is php://output or php://stdout, make it a temporary file...
109
112
$ originalFilename = $ pFilename ;
Original file line number Diff line number Diff line change @@ -139,8 +139,11 @@ public function getWriterPart($pPartName = '')
139
139
* @param string $pFilename
140
140
* @throws Exception
141
141
*/
142
- public function save ($ pFilename = null )
142
+ public function save ($ pFilename )
143
143
{
144
+ if (empty ($ pFilename )) {
145
+ throw new Exception ("Filename is empty " );
146
+ }
144
147
if (!is_null ($ this ->_presentation )) {
145
148
// If $pFilename is php://output or php://stdout, make it a temporary file...
146
149
$ originalFilename = $ pFilename ;
Original file line number Diff line number Diff line change @@ -58,8 +58,11 @@ public function __construct(PHPPowerPoint $pPHPPowerPoint = null)
58
58
* @param string $pFilename
59
59
* @throws Exception
60
60
*/
61
- public function save ($ pFilename = null )
61
+ public function save ($ pFilename )
62
62
{
63
+ if (empty ($ pFilename )) {
64
+ throw new Exception ("Filename is empty " );
65
+ }
63
66
if (!is_null ($ this ->_presentation )) {
64
67
// Create new ZIP file and open it for writing
65
68
$ objZip = new ZipArchive ();
You can’t perform that action at this time.
0 commit comments