[wp-trac] [WordPress Trac] #15300: array instead of string in formatting.php

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 3 00:12:30 UTC 2010


#15300: array instead of string in formatting.php
--------------------------+-------------------------------------------------
 Reporter:  jeje68630     |       Owner:                                            
     Type:  defect (bug)  |      Status:  new                                       
 Priority:  normal        |   Milestone:  Awaiting Review                           
Component:  Formatting    |     Version:  3.0.1                                     
 Severity:  normal        |    Keywords:  formatting.php, strip_tags, sanitize_title
--------------------------+-------------------------------------------------
 Hi,

 I stumbled on a problem. It seems to rise only with a specific theme.
 However, I'm not sure why it produced that result.
 This problem appeared when I changed of web hosting.

 So I had a warning that told me that in formatting.php line 794 an array
 was passed to strip_tags instead of a string.
 It happened only when displaying a single post.
 Besides, the website layout was kind of mixed in the botton of the page,
 just as if the css was going crazy.

 I debugged the thing and trace the variable.

 On line 794, it's the sanitize_title function. The error was raised
 probably because of my permalinks that was set like that :
 %category%/%title%

 Instead of having a string mycategory/mypostitle, the $title variable was
 filled with :
 title[0] : mycategory
 title[1] : myposttitle

 So I forced the $title to be a string. And it seems to work.
 Line 794 : strip_tags((string)$title));

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/15300>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list