[wp-hackers] Problems with export on WP 3.0

Andrew Nacin wp at andrewnacin.com
Sat Jul 17 22:04:40 UTC 2010


On Sat, Jul 17, 2010 at 2:50 PM, Paul <paul at codehooligans.com> wrote:

> The setup:
> WP 3.0 basic install. No installed plugins. Using the TwentyTen theme. Only
> the Post, Pages, Category, Tags created during the initial install process.
> Installed in local laptop environment.
>
> Problem:
> Given the basic initial WP3.0 install when I attempt to run the export I
> receive the following PHP Warning
>
> Warning: strip_tags() expects parameter 1 to be string, array given in
> /Users/codehooligans/www/htdocs/projects/WordPress/
> local.wp30.com/wp-includes/formatting.php on line 2773
>
> I've done some tracing through the code. Seem the function
> wp_strip_all_tags() expects a string but in some instance the parameter is
> an array. Going up the function calls it appears to start in admin.php line
> 89 where the $_GET['taxonomy'] URL parameter is passed to sanitize_key().
> Which in turn calls wp_strip_all_tags();
>
> The issue is actually in the URL generated via the first screen (form) of
> the export. Below is my actual URL used. For some reason the 'category'
> Taxonomy is parameter is being passed in as a '[category]' which gets
> converted into an array.
>
>
> http://local.wp30.com/wp-admin/export.php?mm_start=all&mm_end=all&author=all&taxonomy%5Bcategory%5D=0&post_type=all&status=all&submit=Download+Export+File&download=true


Nice work tracking this down. I did the same about a month ago --
http://core.trac.wordpress.org/changeset/15308. Fixed in 3.0.1, which I
would think will hit the shelves this week.


More information about the wp-hackers mailing list