“WARNING: Found @$ in the file __ Possible error suppression is being used

Question

In my theme custom admin page, i have some checkboxes. To check whether it is checked or not i am using following method.

function mega_menu_deactivater() {
    $mega_menu_condition = get_option( 'deactivate_mega_menu' );
    $checked = ( @$mega_menu_condition == 1 ? 'checked' : '' );
    echo '<input type="checkbox" id="deactivate_mega_menu" name="deactivate_mega_menu" value="1" '.$checked.'>';
}

This works fine. But when i run themecheck i get this Warning.

"WARNING: Found @$ in the file functions-admin.php. Possible error suppression is being used."

is there any alternative to overcome this warning.

0
sahan 2 months 0 Answers 11 views 0

Leave an answer