Erreur: Invalid argument supplied for foreach()

Par Maxime Richard, il y a 10 ans


Bonjour,

Voici j'ai un erreur avec wordpress, jai fait un panneau d'option qui fonctionner sur mamp avec wordpress. une fois en ligne j'ai eu une erreur:: Invalid argument supplied for foreach(). j'ai essayer de mettre un :

if(isset($_POST[''verifier_send])

J'ai enssuit essayer avec !empty() ... voici mon code

foreach($_POST['option'] as $name => $value){ if(empty($value)) { delete_option($name); } else { update_option($name, $value); $compt++; } }

4 réponses

shinix, il y a 10 ans

+1 Carouge10 :)

alex331501, il y a 10 ans

is_array()...

Maxime Richard, il y a 10 ans

Merci alex331501 :)

Carouge10, il y a 10 ans

Invalid politesse, try again, thank you.