lightspeedwp / lsx

LSX is an flexible, light-weight, minimalistic and responsive theme designed to empower makers to build beautifully rich websites with WordPress block editor. The theme displays perfectly on all desktop & mobile devices.
https://lsdev.biz/lsx/
GNU General Public License v3.0
34 stars 3 forks source link

Sanitize function doesn't always return #175

Closed justintadlock closed 7 years ago

justintadlock commented 7 years ago

The lsx_customizer_sanitize_get_default() in inc/sanitize.php doesn't always return. If you look at the code, it only returns under one condition:

function lsx_customizer_sanitize_get_default( $id ) {
    global $lsx_customizer;
    //LSX_Theme_Customizer

    $setting = $lsx_customizer->get_setting($id);

    if ( isset( $setting['default'] ) ) {
        return $setting['default'];
    }
}

Before the closing }, you should add:

return false;

Or:

return '';
nandotess commented 7 years ago

Resolved on LSX 2.0.0 branch.