Within my code, i’m trying to update some options at the table wp_options.
The data is a complex array. But always, the serialized data is truncated at certain chars. For example, this is the last portion of data saved into the table:
Note that the serialized string, is not terminated. After the ‘N’ there is a ‘º’ (Nº) char. So, for some reason, this char makes WP to truncate the generated string at this position.
I’ve tried using the update_option() function, directly with an UPDATE query using $wpdb->query(), tried to clean the string with $wpdb->prepare(), using directly htmlentities() addslashes() ….
Nothing works. The string is always truncated at this char.
But, if I simple echo() the serialized array, then copy from the web browser and paste it on navicat, the UPDATE works perfect. o, its not a problem with the db.
Any idea ???
- The topic ‘UPDATE query gets truncated at certain chars’ is closed to new replies.