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 #59

Undefined value $retval notice

Details

Submitted2003-10-03 12:49 UTC
Frombmansion at mamasam dot com
Assignedtuupola
StatusClosed
PackageSpreadsheet_Excel_Writer
PHP VersionIrrelevant
Roadmaps(Not assigned)

Comments

[2003-10-03 12:49 UTC] bmansion at mamasam dot com

Description:
------------
In Worksheet.php, line 1132, $retval is undefined if no error is thrown in method writeRow().
Fix this by setting $retval a default value.

Reproduce code:
---------------
error_reporting(E_ALL);

$workbook = new Spreadsheet_Excel_Writer();
$worksheet =& $workbook->addWorksheet('Users');

$users[] = array('john', 'doe');
foreach ($users as $row => $user) {
$worksheet->writeRow($row, 0, $user);
}
$workbook->close();

[2003-10-03 12:59 UTC] tuupola at php dot net

This bug has been fixed in CVS.

In case this was a PHP problem, snapshots of the sources are packaged
every three hours; this change will be in the next snapshot. You can
grab the snapshot at http://snaps.php.net/.

In case this was a documentation problem, the fix will show up soon at
http://www.php.net/manual/.

In case this was a PHP.net website problem, the change will show
up on the PHP.net site and on the mirror sites in short time.

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