• Hello,

    I get lots of same PHP warnings:

    PHP Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/w3-total-cache/PgCache_Plugin_Admin.php on line 111

    How can I fix this problem?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Ashok

    (@bappidgreat)

    Hello @sydbrown

    Would you please go to /var/www/html/wp-content/plugins/w3-total-cache/PgCache_Plugin_Admin.php on line 108 and replace

    
    $crons = _get_cron_array();
    

    with

    
    $crons = ( array ) _get_cron_array();
    

    Hope it helps ?? Please feel free to ask more question if you have any.

    Cheers
    Ash

    Thread Starter sydbrown

    (@sydbrown)

    Hi Ash,

    Thank you for your solution. It works!

    Cheers

    Brown

    Thread Starter sydbrown

    (@sydbrown)

    Sorry Ash,

    This warning come up again, but less times than before.

    `[19-Oct-2016 10:24:18] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/w3-total-cache/PgCache_Plugin_Admin.php on line 111
    [19-Oct-2016 10:24:18] PHP Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/plugins/w3-total-cache/PgCache_Plugin_Admin.php on line 111

    Could you please check if there is problem in PgCache_Plugin_Admin.php on line 111 ?

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘W3TC caused PHP warning’ is closed to new replies.