WordPress.org

Support

Support » Plugins and Hacks » Web Fonts » [Plugin: Web Fonts] Error messages with WP_DEBUG=true

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

  • 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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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

    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.
Skip to toolbar