Plugin error in wp_debug mode
-
Hi, first off just wanted to thank you for your work on this awesome little plugin.
I’m getting an error when updating the plugin option with wp_debug mode turned on.
The error is as follows:
Notice: Undefined index: textarea_one in /path-shortened/wp-content/plugins/format-media-titles/format-media-titles.php on line 140 Notice: Undefined index: txt_one in /path-shortened/wp-content/plugins/format-media-titles/format-media-titles.php on line 143 Warning: Cannot modify header information - headers already sent by (output started at /path-shortened/wp-content/plugins/format-media-titles/format-media-titles.php:140) in /path-shortened/wp-includes/pluggable.php on line 1121
When I update your code to check for a value being set all of the errors disappear. Here is my updated code:
if (isset( $input['textarea_one'] )) { $input['textarea_one'] = wp_filter_nohtml_kses($input['textarea_one']); // Sanitize textarea input (strip html tags, and escape characters) } if (isset($input['txt_one'] )) { $input['txt_one'] = wp_filter_nohtml_kses($input['txt_one']); // Sanitize textbox input (strip html tags, and escape characters) }
Just wanted to give you a heads up.
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Plugin error in wp_debug mode’ is closed to new replies.