Title: In php debug mode, errors appear in textareas
Last modified: August 31, 2016

---

# In php debug mode, errors appear in textareas

 *  Resolved [Chris Lloyd](https://wordpress.org/support/users/chrisl27/)
 * (@chrisl27)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/in-php-debug-mode-errors-appear-in-textareas/)
 * Hi camu,
 * In the settings pages there is a configuration option to specify the number of
   rows in a textarea, but when that is not specified by the option an errors appears
   in that textarea.
 * potential fix follows to show the change, I used array_key_exists and assumed
   a rows number of 4 but you may have a different opinion on the right fix : )
 *     ```
       diff --git a/wp-content/plugins/wp-slimstat/admin/wp-slimstat-admin.php b/wp-content/plugins/wp-slimstat/admin/wp-slimstat-admin.php
       index 71f0771..f9ee84b 100644
       --- a/wp-content/plugins/wp-slimstat/admin/wp-slimstat-admin.php
       +++ b/wp-content/plugins/wp-slimstat/admin/wp-slimstat-admin.php
       @@ -1090,7 +1090,7 @@ class wp_slimstat_admin {
                               <td colspan="2">
                                       <label for="<?php echo $_option_name ?>"><?php echo $_option_details['description'] ?></label>
                                       <p class="description"><?php echo $_option_details['long_description'] ?></p>
       -                               <p><textarea class="large-text code" cols="50" rows="<?php echo $_option_details['rows'] ?>" name="options[<?php echo $_option_name ?>]" id="<?php echo $_option_name ?>"><?php echo !empty(wp_slimstat::$options[$_option_name])?stripslashes(wp_slimstat::$options[$_option_name]):'' ?></textarea> <span class="description"><?php echo $_option_details['after_input_field'] ?></span></p>
       +                               <p><textarea class="large-text code" cols="50" rows="<?php echo array_key_exists('rows', $_option_details) ? $_option_details['rows'] : 4 ?>" name="options[<?php echo $_option_name ?>]" id="<?php echo $_option_name ?>"><?php echo !empty(wp_slimstat::$options[$_option_name])?stripslashes(wp_slimstat::$options[$_option_name]):'' ?></textarea> <span class="description"><?php echo $_option_details['after_input_field'] ?></span></p>
                               </td>
                       </tr><?php
               }
       ```
   
 * Cheers,
 *  – Chris
 * [https://wordpress.org/plugins/wp-slimstat/](https://wordpress.org/plugins/wp-slimstat/)

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * (@coolmann)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/in-php-debug-mode-errors-appear-in-textareas/#post-7166610)
 * Good catch, Chris. Added to 4.3.1.
 * Cheers,
    Camu

Viewing 1 replies (of 1 total)

The topic ‘In php debug mode, errors appear in textareas’ is closed to new replies.

 * ![](https://ps.w.org/wp-slimstat/assets/icon.svg?rev=2832242)
 * [SlimStat Analytics](https://wordpress.org/plugins/wp-slimstat/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-slimstat/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-slimstat/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-slimstat/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-slimstat/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-slimstat/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jason Crouse](https://wordpress.org/support/users/coolmann/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/in-php-debug-mode-errors-appear-in-textareas/#post-7166610)
 * Status: resolved