richardshepherd / TwentyTenFive

Updates the WordPress TwentyTen theme to HTML5
http://twentytenfive.com
GNU General Public License v2.0
91 stars 15 forks source link

Undefined variable: new_defaults in comments.php on line 77 #7

Open azizur opened 13 years ago

azizur commented 13 years ago

On my test server I am seeing the following errors. Yes I know this only show when in Debug Mode, but it would be nice get these notices suppressed.

Notice: Undefined variable: new_defaults in /var/www/wordpress/wp-content/themes/twentytenfive/comments.php on line 77 Notice: Undefined variable: commenter in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 594 Notice: Undefined variable: aria_req in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 594 Notice: Undefined variable: commenter in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 597 Notice: Undefined variable: aria_req in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 597 Notice: Undefined variable: commenter in /var/www/wordpress/wp-content/themes/twentytenfive/functions.php on line 600

MoOx commented 13 years ago

+1

jamesedwards commented 13 years ago

I'm fairly new at this... so someone tell me if I've done something incredibly wrong.... but through some light testing it seems to be working.. in your comments.php modify line 77 from <?php comment_form($new_defaults); ?> to <?php comment_form(); ?>

Then add the following right after "$req = get_option('require_name_email');" $commenter = wp_get_current_commenter(); $aria_req = ( $req ? " aria-required='true'" : '' );

Debugging errors went away, and comments appear to be posting without issues.

yasira892 commented 7 years ago

Thank you this is working for me...