'Undefined variable in function php [closed]

I have the following php code below, it keeps throwing out a undefined variable $checked once the plugin is activated.

How do I use function in function correctly?

meta.php



Solution 1:[1]

write this :

function sanitize_check($check = null)

insted:

function sanitize_check($check)

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 amirhosein hadi