[wp-trac] [WordPress Trac] #16698: Better Table field value upgrade check (minor)
WordPress Trac
wp-trac at lists.automattic.com
Mon Feb 28 10:31:07 UTC 2011
#16698: Better Table field value upgrade check (minor)
-------------------------+-----------------------------
Reporter: cogmios | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.1
Severity: minor | Keywords: needs-patch
-------------------------+-----------------------------
line 1463 on /wp-admin/includes/upgrades.php is
{{{
preg_match("|".$tablefield->Field." ([^ ]*(
unsigned)?)|i",$cfields[strtolower($tablefield->Field)], $matches);
$fieldtype = $matches[1];
}}}
There is no check IF a $matches is found. If there is no match found an
error will be displayed 'undefined index 1'. An Error message could be
added here.
Can happen : if the sql code contains no spaces between the fieldname and
the type it will generate the not found [1].
--
Ticket URL: <http://core.trac.wordpress.org/ticket/16698>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list