Title: [Plugin: Web Fonts] Error messages with WP_DEBUG=true
Last modified: August 21, 2016

---

# [Plugin: Web Fonts] Error messages with WP_DEBUG=true

 *  [netaesthetics](https://wordpress.org/support/users/netaesthetics/)
 * (@netaesthetics)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/plugin-web-fonts-error-messages-with-wp_debugtrue/)
 * I get the following error messages when using the web-fonts plugin with `define('
   WP_DEBUG', true);` set in wp-config.php:
 * > Notice: Use of undefined constant CACHE_PERIOD – assumed ‘CACHE_PERIOD’ in /
   > wp-content/plugins/web-fonts/modules/fonts-com/fonts-com.php on line 693
   > Notice: Use of undefined constant CACHE_PERIOD – assumed ‘CACHE_PERIOD’ in /
   > wp-content/plugins/web-fonts/modules/fonts-com/fonts-com.php on line 735
   > Notice: Use of undefined constant CACHE_PERIOD – assumed ‘CACHE_PERIOD’ in /
   > wp-content/plugins/web-fonts/web-fonts.php on line 134
   > Notice: Undefined variable: selector_data in /wp-content/plugins/web-fonts/
   > modules/google-web-fonts/google-web-fonts.php on line 320
   > Notice: Use of undefined constant CACHE_PERIOD – assumed ‘CACHE_PERIOD’ in /
   > wp-content/plugins/web-fonts/modules/google-web-fonts/google-web-fonts.php 
   > on line 322
   > Notice: Use of undefined constant CACHE_PERIOD – assumed ‘CACHE_PERIOD’ in /
   > wp-content/plugins/web-fonts/modules/fonts-com/fonts-com.php on line 715
   > Notice: Undefined variable: selector_data in /wp-content/plugins/web-fonts/
   > modules/google-web-fonts/google-web-fonts.php on line 320
   > Notice: Use of undefined constant CACHE_PERIOD – assumed ‘CACHE_PERIOD’ in /
   > wp-content/plugins/web-fonts/modules/google-web-fonts/google-web-fonts.php 
   > on line 322
   > Notice: Use of undefined constant CACHE_PERIOD – assumed ‘CACHE_PERIOD’ in /
   > wp-content/plugins/web-fonts/modules/google-web-fonts/google-web-fonts.php 
   > on line 342
 * [http://wordpress.org/plugins/web-fonts/](http://wordpress.org/plugins/web-fonts/)

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

 *  [ereckers](https://wordpress.org/support/users/ereckers/)
 * (@ereckers)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/plugin-web-fonts-error-messages-with-wp_debugtrue/#post-4494421)
 * I receive the same thing. You have to go in and manually replace CACHE_PERIOD
   with the actual value.
 * This is in addition to a all kinds of Undefined variable errors in the admin.
 * This will probably need to get cleaned up at some point as WordPress will start
   rejecting plugins in the repository with such errors:
 * > [Notice: SVN will reject PHP with errors](https://make.wordpress.org/plugins/2013/12/22/notice-svn-will-reject-php-with-errors/)
 *  [coreybroderick](https://wordpress.org/support/users/coreybroderick/)
 * (@coreybroderick)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-web-fonts-error-messages-with-wp_debugtrue/#post-4494477)
 * Same issue here.
 * I altered the files to using the CACHE_PERIOD from ‘CACHE_PERIOD’ to ‘Web_Fonts::
   CACHE_Period’. Bit of work, but most errors gone.
 * Had to alter the google-web-fonts on line 320 from
 * `!is_array($selector_data)) {`
    to `!is_array($font_data)) {`
 * to get rid of the last error.

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

The topic ‘[Plugin: Web Fonts] Error messages with WP_DEBUG=true’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/web-fonts.svg)
 * [Web Fonts](https://wordpress.org/plugins/web-fonts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/web-fonts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/web-fonts/)
 * [Active Topics](https://wordpress.org/support/plugin/web-fonts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/web-fonts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/web-fonts/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [coreybroderick](https://wordpress.org/support/users/coreybroderick/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/plugin-web-fonts-error-messages-with-wp_debugtrue/#post-4494477)
 * Status: not resolved