Skip to content

Commit

Permalink
Prevent PHP Notice in attachToFile
Browse files Browse the repository at this point in the history
$calculatedColumns was not declared if preserveFormulas was false, causing a PHP Notice.
  • Loading branch information
deinonychuscowboy authored Nov 14, 2016
1 parent 2b621bb commit 154b1ba
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Svrnm/ExcelDataTables/ExcelDataTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,7 @@ public function setSheetName($name) {
* @return $this
*/
public function attachToFile($srcFilename, $targetFilename = null, $forceAutoCalculation = false) {
$calculatedColumns = null;
if ($this->preserveFormulas){
$temp_xlsx = new ExcelWorkbook($srcFilename);
$calculatedColumns = $temp_xlsx->getCalculatedColumns($this->preserveFormulas);
Expand Down

0 comments on commit 154b1ba

Please sign in to comment.