[wp-trac] [WordPress Trac] #5105: Patch (formatting.php):
notice-level error is being accidentally thrown
WordPress Trac
wp-trac at lists.automattic.com
Sat Sep 29 20:45:45 GMT 2007
#5105: Patch (formatting.php): notice-level error is being accidentally thrown
---------------------+------------------------------------------------------
Reporter: richcon | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: General | Version: 2.3
Severity: normal | Keywords:
---------------------+------------------------------------------------------
The following line in formatting.php throws a notice-leve error
(Uninitialized String Offset) if '$curl' is an empty string:
29: if (isset($curl{0}) && '<' != $curl{0} && $next) { // If
it's not a tag
Clearly, isset($curl{0}) is intended to prevent empty strings from being
tested, but isset doesn't check string offsets.
Changing to the following prevents empty strings from being considered:
if ($curl && '<' != $curl{0} && $next) { // If it's not a
tag
--
Ticket URL: <http://trac.wordpress.org/ticket/5105>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list