Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.3.5

Bug #6769 ImageMap.php doesnot check for boolean false with strpos
Submitted: 2006-02-13 10:44 UTC Modified: 2006-02-13 15:53 UTC
From: peter at jingo dot com Assigned: nosey
Status: Closed Package: Image_Canvas (version 0.2.4)
PHP Version: 5.1.0 OS: Red Hat
Roadmaps: (Not assigned)    
Subscription  


 [2006-02-13 10:44 UTC] peter at jingo dot com
Description: ------------ the function _addMapTag($shape, $coords, $params) contains a check for double quotes when generating the image map. The check (which returns true even if no double quotes are used) is: if (strpos($value, '"') >= 0) { $tags .= $key . '=\'' . $value . '\''; } else { $tags .= $key . '="' . $value . '"'; } Test script: --------------- the fix is: if (strpos($value, '"') === false) { $tags .= $key . '="' . $value . '"'; } else { $tags .= $key . '=\'' . $value . '\''; } Expected result: ---------------- <area shape="circle" coords="75,72,2" href="#test" target="_blank" alt="test" title="test">

Comments

 [2006-02-13 15:53 UTC] nosey
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.