Title: Undefined variable: keys
Last modified: May 6, 2019

---

# Undefined variable: keys

 *  Resolved [Johannes Kinast](https://wordpress.org/support/users/goaroundagain/)
 * (@goaroundagain)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/undefined-variable-keys/)
 * I get an Notice about undefined variable keys on existing taxonomies without 
   alternative URLs:
 * > Notice: Undefined variable: keys in /wp-content/plugins/hreflang-tags-by-dcgws/
   > includes/functions.php on line 369
 * PHP Version: 7.2
 * Line 369:
 * `if (count($keys) == 0) {`
 * Suggested solution: Using empty($keys) instead of count
 * `if (empty($keys)) {`
    -  This topic was modified 7 years, 3 months ago by [Johannes Kinast](https://wordpress.org/support/users/goaroundagain/).
    -  This topic was modified 7 years, 3 months ago by [Johannes Kinast](https://wordpress.org/support/users/goaroundagain/).

Viewing 1 replies (of 1 total)

 *  [David Davis](https://wordpress.org/support/users/dcgws/)
 * (@dcgws)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/undefined-variable-keys/#post-11566970)
 * [@goaroundagain](https://wordpress.org/support/users/goaroundagain/)
 * I have just make that exact correction. Thank you for the suggestion.
 * Best
    David

Viewing 1 replies (of 1 total)

The topic ‘Undefined variable: keys’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/hreflang-tags-by-dcgws_91a8a0.svg)
 * [HREFLANG Tags Lite](https://wordpress.org/plugins/hreflang-tags-by-dcgws/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/hreflang-tags-by-dcgws/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/hreflang-tags-by-dcgws/)
 * [Active Topics](https://wordpress.org/support/plugin/hreflang-tags-by-dcgws/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/hreflang-tags-by-dcgws/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/hreflang-tags-by-dcgws/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [David Davis](https://wordpress.org/support/users/dcgws/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/undefined-variable-keys/#post-11566970)
 * Status: resolved