Use isset() for clearing PHP Notice (Undefined index: HTTP_REFERER)

This commit is contained in:
attosoft committed 2012-05-25 15:03:46 +00:00
1 parent 9e12eef401
commit 46c2928b1d
1 file changed
+1 -1
+1 -1
View File
@@ -17,7 +17,7 @@ class auto_thickbox_options {
add_meta_box( 'text-box', __('Text'), array(&$this, 'text_metabox'), 'auto-thickbox-options', 'normal' );
add_meta_box( 'image-box', $this->texts['image'], array(&$this, 'image_metabox'), 'auto-thickbox-options', 'normal' );
add_meta_box( 'effect-box', __('Effect', 'auto-thickbox') . ' (' . __('beta', 'auto-thickbox') . ')', array(&$this, 'effect_metabox'), 'auto-thickbox-options', 'normal' );
if (strpos($_SERVER['HTTP_REFERER'], 'post_id=' . $this->options['post_id']) !== false) {
if (isset($_SERVER['HTTP_REFERER']) && strpos($_SERVER['HTTP_REFERER'], 'post_id=' . $this->options['post_id']) !== false) {
add_filter('gettext', array(&$this, 'replace_insert_button'), 20, 3);
register_post_type('auto-thickbox-plus', array('label' => AUTO_THICKBOX_PLUS));
}