Bug in custom fields update
-
There’s a bug in the search/replace code for custom fields.
If the custom field meta_value contains single quotes the SQL query fails. To fix this change line 76 to:
$fix = $wpdb->query("UPDATE $wpdb->postmeta SET meta_value = '".esc_sql($edited)."' WHERE meta_id = ".$item->meta_id );
I simply wrapped the
$edited
value in theesc_sql()
function
- The topic ‘Bug in custom fields update’ is closed to new replies.