Support » Plugin: Business Hours Indicator » Invalid argument supplied

  • Resolved Max

    (@maximkadum)


    Hi. I see this problem “Invalid argument supplied for foreach() in ../../business-hours-indicator/includes/class-bhi-hourshelper.php on line 92.

    PHP 7.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Maarten

    (@maartenbelmans)

    Can you let me know when you get this error? Do you have a location with vacation days added to it?

    Maarten

    Plugin Author Maarten

    (@maartenbelmans)

    Can you install the update (1.8.3) to see if that fixes the issue?

    Thread Starter Max

    (@maximkadum)

    I do not have a location with vacation days added to it.

    Use the latest version 1.8.3

    [mbhi_ifopen]
    Open <i class=”fa fa-circle green” aria-hidden=”true”></i>
    [/mbhi_ifopen]

    [mbhi_ifclosed]
    Closed <i class=”fa fa-circle red” aria-hidden=”true”></i>
    [/mbhi_ifclosed]

    Thread Starter Max

    (@maximkadum)

    Problem is not solved. With oldest php version it is work, but with php 7 i see problems “Invalid argument supplied for foreach() in ../../business-hours-indicator/includes/class-bhi-hourshelper.php on line 92″.

    Plugin Author Maarten

    (@maartenbelmans)

    I can’t reproduce the problem. I’m using PHP 7.0.10 and your code works fine for me. Can you let me know:

    – how many locations do you have
    – the location’s opening times.
    – have you added holidays & vacation hours too?

    Thread Starter Max

    (@maximkadum)

    I have one location.

    Time zone – Europe/Moscow.
    Time format – 24 hour format.
    Monday – Friday – 11:30 AM to 9:00 PM
    Saturday – Sunday – 11:30 AM to 7:00 PM
    No holidays, no vacations.

    Plugin Author Maarten

    (@maartenbelmans)

    I just released a new version (1.8.4) which should solve your issue. Can you check and get back to me?

    Thanks!
    Maarten

    Thread Starter Max

    (@maximkadum)

    Now that is fine. Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Invalid argument supplied’ is closed to new replies.