@@ -210,12 +210,12 @@ discard block |
||
210 | 210 | $zip = new ZipArchive(); |
211 | 211 | |
212 | 212 | if (file_exists($pFilename)) { |
213 | - // Added by [email protected] |
|
214 | - // '@' will stop displaying "Resource Unavailable" error because of file is open some where. |
|
215 | - // 'unlink($pFilename) !== true' will check if file is deleted successfully. |
|
216 | - // Throwing exception so that we can handle error easily instead of displaying to users. |
|
213 | + // Added by [email protected] |
|
214 | + // '@' will stop displaying "Resource Unavailable" error because of file is open some where. |
|
215 | + // 'unlink($pFilename) !== true' will check if file is deleted successfully. |
|
216 | + // Throwing exception so that we can handle error easily instead of displaying to users. |
|
217 | 217 | if( @unlink($pFilename) !== true ) |
218 | - throw new WriterException('Could not delete file: ' . $pFilename . ' Please close all applications that are using it.'); |
|
218 | + throw new WriterException('Could not delete file: ' . $pFilename . ' Please close all applications that are using it.'); |
|
219 | 219 | } |
220 | 220 | // Try opening the ZIP file |
221 | 221 | if ($zip->open($pFilename, ZipArchive::OVERWRITE) !== true) { |
@@ -411,8 +411,8 @@ discard block |
||
411 | 411 | } |
412 | 412 | @unlink($pFilename); |
413 | 413 | } |
414 | - return true; |
|
415 | - // Return True to make sure that file is created successfully with no ExceptionsAdded by [email protected] |
|
414 | + return true; |
|
415 | + // Return True to make sure that file is created successfully with no ExceptionsAdded by [email protected] |
|
416 | 416 | } else { |
417 | 417 | throw new WriterException('PhpSpreadsheet object unassigned.'); |
418 | 418 | } |