[wp-trac] [WordPress Trac] #10354: Argument not array in comment.php

WordPress Trac wp-trac at lists.automattic.com
Tue Sep 8 15:40:10 UTC 2009


#10354: Argument not array in comment.php
--------------------------+-------------------------------------------------
 Reporter:  dawblog       |       Owner:                                                                          
     Type:  defect (bug)  |      Status:  new                                                                     
 Priority:  normal        |   Milestone:  2.8.5                                                                   
Component:  General       |     Version:  2.8                                                                     
 Severity:  normal        |    Keywords:  has-patch escape reporter-feedback array_merge editing wp_update_comment
--------------------------+-------------------------------------------------
Changes (by sowsinsk):

  * keywords:  reporter-feedback array_merge editing wp_update_comment =>
               has-patch escape reporter-feedback
               array_merge editing wp_update_comment


Comment:

 I just uploaded a patch that makes the wpdb->escape() function handle
 arrays better by checking if the argument is an array and then recursively
 looping through the data instead of blindly calling addslashes() on it.
 This is the first patch I've ever tried to upload, so I'm a little hazy on
 what kind of tests need to be run, but I can tell you that it fixed all my
 problems.

 An alternate patch would be to change the wp_update_comment() function to
 handle the recursion.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10354#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list