admin管理员组

文章数量:1023018

When enabling PHP version 7.2.17 or newer on my site, I get a PHP-related error message on some pages.

Warning: Use of undefined constant comment_notes_before - assumed 'comment_notes_before' (this will throw an Error in a future version of PHP) in /home/(username)/public_html/(domain name)/wp-content/themes/Divi-child/comments.php on line 68

Here is the code on line 68 of the comments.php file:

comment_form( array( 'fields' => $fields, 'label_submit' => esc_attr__( 'Submit', 'Divi' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a comment', 'Divi' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Divi' ), 'class_submit' => 'submit et_pb_button', comment_notes_before

And here is line 69:

=>'<p class="comment-notes">' . __( '' ) . '</p>' ) ); ?>

Any ideas what could be causing this and what adjustments I need to make to the PHP source code?

When enabling PHP version 7.2.17 or newer on my site, I get a PHP-related error message on some pages.

Warning: Use of undefined constant comment_notes_before - assumed 'comment_notes_before' (this will throw an Error in a future version of PHP) in /home/(username)/public_html/(domain name)/wp-content/themes/Divi-child/comments.php on line 68

Here is the code on line 68 of the comments.php file:

comment_form( array( 'fields' => $fields, 'label_submit' => esc_attr__( 'Submit', 'Divi' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a comment', 'Divi' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Divi' ), 'class_submit' => 'submit et_pb_button', comment_notes_before

And here is line 69:

=>'<p class="comment-notes">' . __( '' ) . '</p>' ) ); ?>

Any ideas what could be causing this and what adjustments I need to make to the PHP source code?

Share Improve this question edited May 2, 2019 at 19:37 Mr Ethernet asked May 2, 2019 at 19:08 Mr EthernetMr Ethernet 1035 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Please try to change that line to

comment_form( array( 'fields' => $fields, 'label_submit' => esc_attr__( 'Submit', 'Divi' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a comment', 'Divi' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Divi' ), 'class_submit' => 'submit et_pb_button', 'comment_notes_before' 

When enabling PHP version 7.2.17 or newer on my site, I get a PHP-related error message on some pages.

Warning: Use of undefined constant comment_notes_before - assumed 'comment_notes_before' (this will throw an Error in a future version of PHP) in /home/(username)/public_html/(domain name)/wp-content/themes/Divi-child/comments.php on line 68

Here is the code on line 68 of the comments.php file:

comment_form( array( 'fields' => $fields, 'label_submit' => esc_attr__( 'Submit', 'Divi' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a comment', 'Divi' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Divi' ), 'class_submit' => 'submit et_pb_button', comment_notes_before

And here is line 69:

=>'<p class="comment-notes">' . __( '' ) . '</p>' ) ); ?>

Any ideas what could be causing this and what adjustments I need to make to the PHP source code?

When enabling PHP version 7.2.17 or newer on my site, I get a PHP-related error message on some pages.

Warning: Use of undefined constant comment_notes_before - assumed 'comment_notes_before' (this will throw an Error in a future version of PHP) in /home/(username)/public_html/(domain name)/wp-content/themes/Divi-child/comments.php on line 68

Here is the code on line 68 of the comments.php file:

comment_form( array( 'fields' => $fields, 'label_submit' => esc_attr__( 'Submit', 'Divi' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a comment', 'Divi' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Divi' ), 'class_submit' => 'submit et_pb_button', comment_notes_before

And here is line 69:

=>'<p class="comment-notes">' . __( '' ) . '</p>' ) ); ?>

Any ideas what could be causing this and what adjustments I need to make to the PHP source code?

Share Improve this question edited May 2, 2019 at 19:37 Mr Ethernet asked May 2, 2019 at 19:08 Mr EthernetMr Ethernet 1035 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

Please try to change that line to

comment_form( array( 'fields' => $fields, 'label_submit' => esc_attr__( 'Submit', 'Divi' ), 'title_reply' => '<span>' . esc_attr__( 'Leave a comment', 'Divi' ) . '</span>', 'title_reply_to' => esc_attr__( 'Leave a Reply to %s', 'Divi' ), 'class_submit' => 'submit et_pb_button', 'comment_notes_before' 

本文标签: PHP error when using newer PHP versions