Home » File Formats » Spreadsheet_Excel_Writer » Bug #7540
Object to int comparison gives Notice in php5
Details
| Submitted | 2006-05-01 21:58 UTC |
|---|---|
| From | truth at proposaltech dot com |
| Status | Duplicate |
| Package | Spreadsheet_Excel_Writer |
| PHP Version | 5.1.2 |
| OS | SuSE |
| Roadmaps | (Not assigned) |
Comments
[2006-05-01 21:58 UTC] truth at proposaltech dot com
Description:
------------
There are a couple places where a passed
format object is compared to 0. That
isn't "notice clean" code in php 5.
Test script:
---------------
Anything involving formatting. In my local
copy, I made the following changes:
vi Spreadsheet/Excel/Writer/Worksheet.php +1233
if (is_object($format)) {
vi Spreadsheet/Excel/Writer/Worksheet.php +1686
if (!is_object($format) and $format == 0) {
(Perhaps "!is_object($format)" implies "$format == 0",
but I wasn't sure, so I played it safe.)
I haven't done an exhaustive search for object to
integer comparisons. These are just the cases I
ran into. With the above changes, the code paths
I use are all happy.
Expected result:
----------------
No notices would be nice.
Actual result:
--------------
Notices are produced.
[2006-05-09 16:08 UTC] pear dot php dot net at chsc dot dk
This is duplicate of bug #6509.