Title: Fatal errors when trying to save API key
Last modified: August 17, 2018

---

# Fatal errors when trying to save API key

 *  Resolved [TWD](https://wordpress.org/support/users/twd/)
 * (@twd)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-errors-when-trying-to-save-api-key/)
 * Pretty sure I followed all the steps.
 * But on trying to save the Google API key the site crashes to a white screen with
   this:
 *     ```
       Warning: count(): Parameter must be an array or an object that implements Countable in /home/mysite/public_html/mysite.com/wp-content/plugins/google-pagespeed-insights/classes/class-GPI-Actions.php on line 39
   
       Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/mysite.com/wp-content/plugins/google-pagespeed-insights/classes/class-GPI-Actions.php:39) in /home/mysite/public_html/mysite.com/wp-content/plugins/sg-cachepress/class-sg-cachepress.php on line 315
       ```
   
    -  This topic was modified 7 years, 10 months ago by [TWD](https://wordpress.org/support/users/twd/).

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

 *  Plugin Author [Matt Keys](https://wordpress.org/support/users/mattkeys/)
 * (@mattkeys)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-errors-when-trying-to-save-api-key/#post-10600267)
 * Hi TWD,
 * I’ve been able to verify the first error you mention, it is not a fatal error
   and it does not stop the plugin from working. At least on my test environments.
   But the next error you list out is from sg-cachepress, perhaps the earlier warning
   + having sg-cachepress together is enough to cause bigger issues.
 * I will release a little update today with a fix for the warning, let me know 
   if it solves the problem you are seeing.
 *  Plugin Author [Matt Keys](https://wordpress.org/support/users/mattkeys/)
 * (@mattkeys)
 * [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-errors-when-trying-to-save-api-key/#post-10600362)
 * Okay just released v3.0.5 with this fix in it.

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

The topic ‘Fatal errors when trying to save API key’ is closed to new replies.

 * ![](https://ps.w.org/google-pagespeed-insights/assets/icon-256x256.png?rev=1692787)
 * [Insights from Google PageSpeed](https://wordpress.org/plugins/google-pagespeed-insights/)
 * [Support Threads](https://wordpress.org/support/plugin/google-pagespeed-insights/)
 * [Active Topics](https://wordpress.org/support/plugin/google-pagespeed-insights/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-pagespeed-insights/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-pagespeed-insights/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Matt Keys](https://wordpress.org/support/users/mattkeys/)
 * Last activity: [7 years, 10 months ago](https://wordpress.org/support/topic/fatal-errors-when-trying-to-save-api-key/#post-10600362)
 * Status: resolved