[wp-hackers] Problems with export on WP 3.0

Paul paul at codehooligans.com
Sat Jul 17 18:50:27 UTC 2010


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


More information about the wp-hackers mailing list