Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#14428 closed defect (bug) (duplicate)

Warning on export in wp-includes/formatting.php

Reported by: kau-boy Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Export Keywords:
Focuses: Cc:


Trying to export the WordPress data with the export functionality you get the following warning:

Warning: strip_tags() expects parameter 1 to be string, array given in C:\xampp\htdocs\wordpress\wp-includes\formatting.php on line 2776

That happens because the export mechanism tries to use an array with the categories on the function wp_strip_all_tags() which can only get strings as a parameter.
To fix the bug you can either remove the call to wp_strip_all_tags() (wherever it takes place), or you can check the parameter of the wp_strip_all_tags() function to be a string (add to line 2772 of wp-includes/formatting.php):

// not a string
if( !is_string( $string ) )
	retrun $string;

Change History (3)

#1 in reply to: ↑ description @kau-boy
5 years ago

Replying to kau-boy:
sorry, there is a typo in the 'return' statement

#2 @kau-boy
5 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

duplicate to #14026

#3 @nacin
5 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.