richardshepherd / TwentyTenFive

Updates the WordPress TwentyTen theme to HTML5

Home Page:http://twentytenfive.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Undefined variable: new_defaults in comments.php on line 77

azizur opened this issue · comments

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

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
to

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.

Thank you this is working for me...