PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » Spreadsheet_Excel_Writer » Bug #399

var $_selection is declared twice in Spreadsheet\Excel\Writer\Worksheet.php

Details

Submitted2003-12-10 17:40 UTC
Fromdv at josheli dot com
Assignedxnoguer
StatusClosed
PackageSpreadsheet_Excel_Writer
PHP Version5.0.0b2 (beta2)
OSWin2000
Roadmaps(Not assigned)

Comments

[2003-12-10 17:40 UTC] dv at josheli dot com

Description:
------------
Fatal error: Cannot redeclare spreadsheet_excel_writer_worksheet::$_selection in C:\dev\Spreadsheet\Excel\Writer\Worksheet.php on line 146

Reproduce code:
---------------
<?php
require_once 'Spreadsheet/Excel/Writer.php';

// We give the path to our file here
$workbook = new Spreadsheet_Excel_Writer('.\\example1.xls');

$worksheet =& $workbook->addWorksheet('My first worksheet');

$worksheet->write(0, 0, 'Name');
$worksheet->write(0, 1, 'Age');
$worksheet->write(1, 0, 'John Smith');
$worksheet->write(1, 1, 30);
$worksheet->write(2, 0, 'Johann Schmidt');
$worksheet->write(2, 1, 31);
$worksheet->write(3, 0, 'Juan Herrera');
$worksheet->write(3, 1, 32);

// We still need to explicitly close the workbook
$workbook->close();
?>

Expected result:
----------------
nothing. a new .xls file created.

Actual result:
--------------
Fatal error: Cannot redeclare spreadsheet_excel_writer_worksheet::$_selection in C:\dev\Spreadsheet\Excel\Writer\Worksheet.php on line 146

[2003-12-10 17:49 UTC] xnoguer at php dot net

This bug has been fixed in CVS.

In case this was a documentation problem, the fix will show up at the
end of next Sunday (CET) on pear.php.net.

In case this was a pear.php.net website problem, the change will show
up on the website in short time.

Thank you for the report, and for helping us make PEAR better.