Title: PHP Warning
Last modified: September 3, 2021

---

# PHP Warning

 *  Resolved [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/)
 * PHP message: PHP Warning: Invalid argument supplied for foreach() in /wp-content/
   plugins/speed-booster-pack/includes/classes/class-sbp-font-optimizer.php on line
   208

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [Optimocha](https://wordpress.org/support/users/optimocha/)
 * (@optimocha)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14834802)
 * Hey [@mookie4a4](https://wordpress.org/support/users/mookie4a4/), can you share
   the website address?
 *  Thread Starter [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14834846)
 * Hello
 * This is one of our URLS that logs the warning:
    [https://scramblestuff.com/au/](https://scramblestuff.com/au/)
 * Cheers
    Matt
 *  Plugin Author [Optimocha](https://wordpress.org/support/users/optimocha/)
 * (@optimocha)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14834973)
 * [@mookie4a4](https://wordpress.org/support/users/mookie4a4/) hmm, looks like 
   it’s successfully optimizing the fonts… Are you getting this warning logged constantly
   or did you get it just once?
 *  Thread Starter [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835081)
 * The logs are about 5 minutes apart:
    [Fri Sep 03 11:00:18.131030 2021] [Fri Sep
   03 11:05:18.177640 2021] [Fri Sep 03 11:10:18.188803 2021] [Fri Sep 03 11:15:
   18.120478 2021]
 * All with referer: [https://scramblestuff.com/au](https://scramblestuff.com/au)
 * All with the IP 63.143.42.244 so might be a bot or attack?
    -  This reply was modified 4 years, 8 months ago by [mookie4a4](https://wordpress.org/support/users/mookie4a4/).
 *  Plugin Author [Optimocha](https://wordpress.org/support/users/optimocha/)
 * (@optimocha)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835128)
 * [@mookie4a4](https://wordpress.org/support/users/mookie4a4/) I’d be surprised.
   What happens when you disable the font optimize feature (while the plugin is 
   active), do the warnings stop?
 *  Thread Starter [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835162)
 * I have disabled the font optimize setting and the warnings have stopped.
 * Cheers
 *  Plugin Author [Optimocha](https://wordpress.org/support/users/optimocha/)
 * (@optimocha)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835185)
 * [@mookie4a4](https://wordpress.org/support/users/mookie4a4/) awesome (that we’re
   making progress). In that file that’s throwing the warnings, can you replace 
   line 11:
 * `private $families;`
 * With the following:
 * `private $families = [];`
 * And enable the font optimize feature again, see what happens?
 *  Thread Starter [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835298)
 * Yep that seemed to have fixed it, no more warnings with the setting back on.
 *  Plugin Author [Optimocha](https://wordpress.org/support/users/optimocha/)
 * (@optimocha)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835325)
 * [@mookie4a4](https://wordpress.org/support/users/mookie4a4/) awesome! We’ll release
   the next update with this change. Thank you so much for your cooperation!
 *  Thread Starter [mookie4a4](https://wordpress.org/support/users/mookie4a4/)
 * (@mookie4a4)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835383)
 * No problem! Thanks for your help.
 * Cheers!
 *  Plugin Author [Optimocha](https://wordpress.org/support/users/optimocha/)
 * (@optimocha)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835956)
 * [@mookie4a4](https://wordpress.org/support/users/mookie4a4/) our pleasure! If
   you’ve got time for a one-minute review, we’d love it if you gave us a fair rating:
   [https://wordpress.org/support/plugin/speed-booster-pack/reviews/#new-post](https://wordpress.org/support/plugin/speed-booster-pack/reviews/#new-post)

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘PHP Warning’ is closed to new replies.

 * ![](https://ps.w.org/speed-booster-pack/assets/icon.svg?rev=2342732)
 * [Speed Booster Pack ⚡ PageSpeed Optimization Suite](https://wordpress.org/plugins/speed-booster-pack/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/speed-booster-pack/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/speed-booster-pack/)
 * [Active Topics](https://wordpress.org/support/plugin/speed-booster-pack/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/speed-booster-pack/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/speed-booster-pack/reviews/)

 * 11 replies
 * 2 participants
 * Last reply from: [Optimocha](https://wordpress.org/support/users/optimocha/)
 * Last activity: [4 years, 8 months ago](https://wordpress.org/support/topic/php-warning-306/#post-14835956)
 * Status: resolved