Error in code using wp_nonce_field incorrectly
-
A coding error in check-email.php on line 178 is causing invalid html to be output.
The problem is using the function wp_nonce_field( ‘checkemail’ ) concatenated in a string.
wp_nonce_field( ‘checkemail’ ) already ‘echos’, outputing directly into the stream, so you cannot use it like this:
<input type="submit" name="checkemail_go" id="checkemail_go" class="button-primary" value="' . __( "Send test email", "check-email" ) . '" /></p> ' . wp_nonce_field( 'checkemail' ) . ' </form>
Needs to be changed to:
<input type="submit" name="checkemail_go" id="checkemail_go" class="button-primary" value="' . __( "Send test email", "check-email" ) . '" /></p>'; wp_nonce_field( 'checkemail' ); echo '</form>
- The topic ‘Error in code using wp_nonce_field incorrectly’ is closed to new replies.