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

invalid use of integer compare in version 5.1.2 -- two errors listed below

Details

Submitted2006-05-05 16:12 UTC
Fromgkelley at stl dot vt dot edu
StatusDuplicate
PackageSpreadsheet_Excel_Writer
PHP Version5.1.2
OSWindows XP Pro
Roadmaps(Not assigned)

Comments

[2006-05-05 16:12 UTC] gkelley at stl dot vt dot edu

Description:
------------
There are two instances of this problem:

1) See function _XF(&$format)

Comparing $format = 0 creates an error. I have locally modified my code in the following way and it appears to work correctly. I'm not sure if this is the best solution, but it is a starting point: (Obviously the style changes are not important for the bug fix).

function _XF(&$format)
{
if (is_object($format))
{
return($format->getXfIndex());
}
else
{
return(0x0F);
}
}

2)See function writeBlank($row, $col, $format)

Similar change here ...

function writeBlank($row, $col, $format)
{
// Don't write a blank cell unless it has a format
if (!(is_object($format)))
{
return(0);
}
...
}

[2006-05-09 16:08 UTC] pear dot php dot net at chsc dot dk

This is duplicate of bug #6509.