Title: [Plugin: Shortcoder] PHP Notices after enabling the plugin
Last modified: August 20, 2016

---

# [Plugin: Shortcoder] PHP Notices after enabling the plugin

 *  [Evan Mattson](https://wordpress.org/support/users/aaemnnosttv/)
 * (@aaemnnosttv)
 * [14 years ago](https://wordpress.org/support/topic/plugin-shortcoder-php-notices-after-enabling-the-plugin/)
 * Love the plugin. It seems there are some loose ends that could be quickly fixed.
 * `NOTICE: C:\xampp\htdocs\wordpress\wp-content\plugins\shortcoder\shortcoder.php:
   231 - Undefined variable: edit`
    `NOTICE: C:\xampp\htdocs\wordpress\wp-content\
   plugins\shortcoder\shortcoder.php:234 - Undefined variable: sc_name_edit`
 * Because you’re using comparison logic on the variable without checking if it 
   exists, the variable should be set either way in the logic that is defining it.
 *     ```
       if($_POST["sc_form_action"] == "edit"){
       			$sc_content = stripslashes($sc_options[$sc_name_edit]['content']);
       			$sc_disable = $sc_options[$sc_name_edit]['disabled'];
       			$sc_hide_admin = $sc_options[$sc_name_edit]['hide_admin'];
   
       			$title = "Edit this Shortcode - " . '<small>' . $sc_name_edit . '</small>';
       			$button = "Update Shortcode";
       			$edit = 1;
       		}else{
       			unset($sc_options[$sc_name_edit]);
       			unset($sc_name_edit);
       			update_option("shortcoder_data", $sc_options);
       			echo '<div class="message updated fade"><p>' . __('Shortcode deleted successfully !', 'sc') . '</p></div>';
       		}
       ```
   
 * for example, you could change it like this:
 *     ```
       }else{
       	$edit = 0;
       	unset($sc_options[$sc_name_edit]);
       	unset($sc_name_edit);
       	update_option("shortcoder_data", $sc_options);
       	echo '<div class="message updated fade"><p>' . __('Shortcode deleted successfully !', 'sc') . '</p></div>';
       }
       ```
   
 * [http://wordpress.org/extend/plugins/shortcoder/](http://wordpress.org/extend/plugins/shortcoder/)

The topic ‘[Plugin: Shortcoder] PHP Notices after enabling the plugin’ is closed
to new replies.

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Evan Mattson](https://wordpress.org/support/users/aaemnnosttv/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/plugin-shortcoder-php-notices-after-enabling-the-plugin/)
 * Status: not resolved