Skip to content

Commit 1da9e77

Browse files
fbrinkerFlorian Brinker
andauthored
Fix setting the active worksheet not working (#33)
Co-authored-by: Florian Brinker <mail+git@f-brinker.de>
1 parent 4c2dc64 commit 1da9e77

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Spreadsheet/Excel/Writer/Worksheet.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,8 +380,8 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr
380380
*
381381
* @param string $name The name of the new worksheet
382382
* @param integer $index The index of the new worksheet
383-
* @param mixed $activesheet The current activesheet of the workbook we belong to
384-
* @param mixed $firstsheet The first worksheet in the workbook we belong to
383+
* @param mixed &$activesheet The current activesheet of the workbook we belong to
384+
* @param mixed &$firstsheet The first worksheet in the workbook we belong to
385385
* @param int &$str_total Reference to the total number of strings in the workbook
386386
* @param int &$str_unique Reference to the number of unique strings in the workbook
387387
* @param array &$str_table Reference to the array containing all the unique strings in the workbook
@@ -391,8 +391,8 @@ class Spreadsheet_Excel_Writer_Worksheet extends Spreadsheet_Excel_Writer_BIFFwr
391391
* @access private
392392
*/
393393
public function __construct($BIFF_version, $name,
394-
$index, $activesheet,
395-
$firstsheet, &$str_total,
394+
$index, &$activesheet,
395+
&$firstsheet, &$str_total,
396396
&$str_unique, &$str_table,
397397
$url_format, $parser,
398398
$tmp_dir)
@@ -405,8 +405,8 @@ public function __construct($BIFF_version, $name,
405405

406406
$this->name = $name;
407407
$this->index = $index;
408-
$this->activesheet = $activesheet;
409-
$this->firstsheet = $firstsheet;
408+
$this->activesheet = &$activesheet;
409+
$this->firstsheet = &$firstsheet;
410410
// _str_total _str_unique _str_table - are actual references
411411
// everything breaks if they're not
412412
$this->_str_total = &$str_total;

0 commit comments

Comments
 (0)