Support » Plugin: Creative Commons Configurator » Notice: Undefined variable: button_code in /path/to/wordpress/wp-content/plugins

  • Resolved Vidyut

    (@vidyut)


    debug shows notice for undefined variable.

    Notice: Undefined variable: button_code in /var/www/aamjanata/wp-content/plugins/creative-commons-configurator-1/cc-configurator.php on line 723

    To fix, add an empty string ‘$button_code = “”;’ for the variable before the code.

    // License button inclusion
        if ($show_button == "default") {
            if ($cc_settings["options"]["cc_body_img"]) {
                $button_code = bccl_get_license_image_hyperlink($button) . "<br />";
            }
        } elseif ($show_button == "yes") {
            $button_code = bccl_get_license_image_hyperlink($button) . "<br />";
        } elseif ($show_button == "no") {
            $button_code = "";
        } else {
            $button_code = "ERROR";
        }

    to

    // License button inclusion
    $button_code = "";
        if ($show_button == "default") {
            if ($cc_settings["options"]["cc_body_img"]) {
                $button_code = bccl_get_license_image_hyperlink($button) . "<br />";
            }
        } elseif ($show_button == "yes") {
            $button_code = bccl_get_license_image_hyperlink($button) . "<br />";
        } elseif ($show_button == "no") {
            $button_code = "";
        } else {
            $button_code = "ERROR";
        }

    http://wordpress.org/plugins/creative-commons-configurator-1/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Notice: Undefined variable: button_code in /path/to/wordpress/wp-content/plugins’ is closed to new replies.