[Small bugs fixes] Undefined variables and such
-
Hiya Marco,
When going through my files, I noticed I made some small bugfixes of which I can’t remember whether I’d reported them yet. Hope you can incorporate them in the next version. Line numbers are based on the current plugin version, i.e. 2.4.2.
Thanks!
Smile,
Juliette*********************
File: cimy-uef-admin.php
Find line 543-545:
$selected_input["value"] = esc_html($selected_input["value"]); $selected_input["label"] = esc_html($selected_input["label"]); $selected_input["desc"] = esc_html($selected_input["desc"]);Replace with:
$selected_input["value"] = isset( $selected_input["value"] ) ? esc_html($selected_input["value"]) : ''; $selected_input["label"] = isset( $selected_input["label"] ) ? esc_html($selected_input["label"]) : ''; $selected_input["desc"] = isset( esc_html($selected_input["desc"] ) ? esc_html($selected_input["desc"]) : '';Find line 610:
<input type="checkbox" name="email[0]" value="1"<?php checked(true, $store_rule['email'], true); ?> /> <?php _e("Check for E-mail syntax", $cimy_uef_domain); ?><br />Replace with:
<input type="checkbox" name="email[0]" value="1"<?php (isset($store_rule['email']) ? checked(true, $store_rule['email'], true): ''); ?> /> <?php _e("Check for E-mail syntax", $cimy_uef_domain); ?><br />Find line 657:
<input type="checkbox" name="email_admin[0]" value="1"<?php checked(true, $store_rule['email_admin'], true); ?> /> <?php _e("Send an email to the admin if the user changes its value", $cimy_uef_domain); ?><br />Replace with:
<input type="checkbox" name="email_admin[0]" value="1"<?php (isset($store_rule['email_admin']) ? checked(true, $store_rule['email_admin'], true):''); ?> /> <?php _e("Send an email to the admin if the user changes its value", $cimy_uef_domain); ?><br />File: cimy-uef-init.php
Find line 104:
if ($options['image_fields'][$rule_name] > 0) {Replace with:
if ( isset( $options['image_fields'] ) && $options['image_fields'][$rule_name] > 0) {Find line 111:
if ($options['file_fields'][$rule_name] > 0) {Replace with:
if ( isset( $options['file_fields'] ) && $options['file_fields'][$rule_name] > 0) {Find line 116:
if ($options['tinymce_fields'][$rule_name] > 0 && function_exists("wp_editor")) {Replace with:
if ( ( isset($options['tinymce_fields'] ) && $options['tinymce_fields'][$rule_name] > 0 ) && function_exists("wp_editor")) {Find line 123:
if ($options['tinymce_fields'][$rule_name] > 0 && function_exists("wp_editor")) {Replace with:
if ( ( isset( $options['tinymce_fields'] ) && $options['tinymce_fields'][$rule_name] > 0 ) && function_exists("wp_editor")) {File: cimy-uef-options.php
Find line 42:
$old_reg_log = $options['registration-logo'];Replace with:
$old_reg_log = isset($options['registration-logo'] ) ? $options['registration-logo'] : '';
The topic ‘[Small bugs fixes] Undefined variables and such’ is closed to new replies.