Title: PHP error undefined constant
Last modified: November 26, 2018

---

# PHP error undefined constant

 *  Resolved [rmaramos](https://wordpress.org/support/users/rmaramos/)
 * (@rmaramos)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/php-error-undefined-constant/)
 * Hello,
 * The plugin is constantly showing yhis error in php log:
 * PHP Warning: Use of undefined constant is_year – assumed ‘is_year’ (this will
   throw an Error in a future version of PHP) in /home/bandasde/public_html/wp-content/
   plugins/shortcoder/includes/metadata.php on line 116
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-error-undefined-constant%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/php-error-undefined-constant/#post-10917999)
 * Found the issue… I’ll fix it in next release.
    For now can you please add `()`
   next to `is_year` in line 116 in shortcoder\includes\metadata.php file ?
 * [https://plugins.trac.wordpress.org/browser/shortcoder/trunk/includes/metadata.php#L116](https://plugins.trac.wordpress.org/browser/shortcoder/trunk/includes/metadata.php#L116)
 * Like this,
 * `}elseif( is_year() ){`
 * Thanks,
    Aakash
 *  Plugin Author [vaakash](https://wordpress.org/support/users/vaakash/)
 * (@vaakash)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/php-error-undefined-constant/#post-10939266)
 * Issue is fixed in v4.2
 * Thanks,
    Aakash

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

The topic ‘PHP error undefined constant’ is closed to new replies.

 * ![](https://ps.w.org/shortcoder/assets/icon.svg?rev=2222236)
 * [Shortcoder — Create Shortcodes for Anything](https://wordpress.org/plugins/shortcoder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shortcoder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shortcoder/)
 * [Active Topics](https://wordpress.org/support/plugin/shortcoder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shortcoder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shortcoder/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [vaakash](https://wordpress.org/support/users/vaakash/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/php-error-undefined-constant/#post-10939266)
 * Status: resolved