Title: Error when posting a comment
Last modified: March 7, 2021

---

# Error when posting a comment

 *  Resolved [alena353](https://wordpress.org/support/users/alena353/)
 * (@alena353)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-posting-a-comment/)
 * Hello!
 * Each time when a user presses ‘Send a comment’ button, it shows a blank page 
   with the following errors:
 * Warning: Invalid argument supplied for foreach() in /var/www/u1316335/data/www/
   u1316335.isp.regruhosting.ru/wp-content/plugins/master-addons/inc/modules/header-
   footer-comment/inc/comments/class-comments-builder.php on line 138
 * Warning: Cannot modify header information — headers already sent by (output started
   at /var/www/u1316335/data/www/u1316335.isp.regruhosting.ru/wp-content/plugins/
   master-addons/inc/modules/header-footer-comment/inc/comments/class-comments-builder.
   php:138) in /var/www/u1316335/data/www/u1316335.isp.regruhosting.ru/wp-includes/
   pluggable.php on line 1296
 * Warning: Cannot modify header information — headers already sent by (output started
   at /var/www/u1316335/data/www/u1316335.isp.regruhosting.ru/wp-content/plugins/
   master-addons/inc/modules/header-footer-comment/inc/comments/class-comments-builder.
   php:138) in /var/www/u1316335/data/www/u1316335.isp.regruhosting.ru/wp-includes/
   pluggable.php on line 1299
 * As I understand, the last two errors show up because of the first one. What I
   have on lines 137-151:
 *     ```
       if(isset($comment_meta )){
                       foreach ($comment_meta as $key => $value) {
   
                           $label_name         = $value['label_name'];
                           $field_type         = $value['field_type'];
                           $required           = $value['required'];
   
                           $unique_field_id    = strtolower(str_replace(" ", "_",$label_name));
   
                           $jltma_field_value = 'jltma_' . $unique_field_id;
   
                           if( isset( $_POST[$jltma_field_value] ) )
                               update_comment_meta( $comment_id, $jltma_field_value, esc_attr( $_POST[$jltma_field_value] ) );
                       }
                   }
       ```
   
 * Please, help!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-when-posting-a-comment%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Thread Starter [alena353](https://wordpress.org/support/users/alena353/)
 * (@alena353)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-posting-a-comment/#post-14148621)
 * Eventually, I just deleted Master Addons plugin and installed another one that
   supports menu design. It helped with the errors above.

Viewing 1 replies (of 1 total)

The topic ‘Error when posting a comment’ is closed to new replies.

 * ![](https://ps.w.org/master-addons/assets/icon.svg?rev=3001717)
 * [Master Addons For Elementor – Widgets, Extensions, Theme Builder, Popup Builder & Template Kits](https://wordpress.org/plugins/master-addons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/master-addons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/master-addons/)
 * [Active Topics](https://wordpress.org/support/plugin/master-addons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/master-addons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/master-addons/reviews/)

 * 1 reply
 * 1 participant
 * Last reply from: [alena353](https://wordpress.org/support/users/alena353/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/error-when-posting-a-comment/#post-14148621)
 * Status: resolved