WordPress.org

Make WordPress Core

Ticket #22979: wp-includes.patch

File wp-includes.patch, 756 bytes (added by sergej.mueller, 16 months ago)

ticket patch

  • comment.php

     
    13881388        $commentdata['comment_parent'] = ( 'approved' == $parent_status || 'unapproved' == $parent_status ) ? $commentdata['comment_parent'] : 0; 
    13891389 
    13901390        $commentdata['comment_author_IP'] = preg_replace( '/[^0-9a-fA-F:., ]/', '',$_SERVER['REMOTE_ADDR'] ); 
    1391         $commentdata['comment_agent']     = substr($_SERVER['HTTP_USER_AGENT'], 0, 254); 
     1391        $commentdata['comment_agent']     = ( isset($_SERVER['HTTP_USER_AGENT']) ? substr($_SERVER['HTTP_USER_AGENT'], 0, 254) : '' ); 
    13921392 
    13931393        $commentdata['comment_date']     = current_time('mysql'); 
    13941394        $commentdata['comment_date_gmt'] = current_time('mysql', 1);