[wp-trac] [WordPress Trac] #36454: Post Status Transition hook error if title contains quotes or special chars

WordPress Trac noreply at wordpress.org
Sat Apr 9 07:04:20 UTC 2016


#36454: Post Status Transition hook error if title contains quotes or special chars
--------------------------+-----------------------------
 Reporter:  mikylucky     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  4.4.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Hi,
 this is my fist bug report, so I hope doing it well :D
 I think i found a bug.
 I wrote a plugin which uses the 'draft_to_publish' hook. It usually works
 well, but I have some problems if the post title contains quotes or
 special chars.
 Going more specific, I access the post with "$post = get_post($id)" inside
 my function, but if I try to access the post title with
 "$post->post_title" it gives me an empty string.
 Moreover, this is very strange, if I use $wpdb->insert(), $wpdb->insert_id
 results null even if the insert is correctly executed.
 If the title does not contains quotes or special chars all works well

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36454>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list