Support » Plugin: Curs Valutar Live BNR » Eroare php – invalid argument supplied for foreach

  • Resolved Daniel Mesteru

    (@daniel-mesteru)


    Salutare,

    Elegant si util plugin dar exista o problema, care apare la activarea lui:
    Warning: Invalid argument supplied for foreach() in E:\XAMPP\htdocs\….\wp-content\plugins\curs-valutar-live-bnr\includes\functions.php on line 12

    Folosesc shortcode-ul [curs_bnr] pentru a-l afisa in sidebar.

    E interesat faptul ca eroarea se manifesta doar la activare. Metoda de remediere pe care am gasit-o a fost sa intru in fisierul \includes\functions.php si sa ii dau save (fara modificari, doar ca refresh) ca mai apoi sa dispara eroarea si sa functioneze normal.
    Nu imi dau seama care e sursa problemei totusi. Poate ajuta si alti utilizatori 🙂

    Multumesc,
    Daniel

Viewing 4 replies - 1 through 4 (of 4 total)
  • Astazi am observat din nou eroarea. Any ideas? Apare la prima accesare a site-ului, dupa un refresh ea dispare… Poate sa fie de la serverul local?

    Warning: Invalid argument supplied for foreach() in E:\XAMPP\htdocs\…..\wp-content\plugins\curs-valutar-live-bnr\includes\functions.php on line 12

    Check my reply here: https://wordpress.org/support/topic/php-warning-106/

    I do not use this plugin but i think if you edit “\wp-content\plugins\curs-valutar-live-bnr\includes\functions.php” line 12:

    foreach($values as $symbol => $value)

    to:

    foreach((array) $values as $symbol => $value)

    It might be solved.

    Hi @damsko,

    Thank you so much for your response, that did the trick. It seems to be ok now.

    All the best,
    Daniel

    Ha Daniel, good to hear and thanks for reporting back.

    Greetings, damsko.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Eroare php – invalid argument supplied for foreach’ is closed to new replies.