Title: Unknown Error Ksort()
Last modified: June 6, 2019

---

# Unknown Error Ksort()

 *  Resolved [John Swaringen](https://wordpress.org/support/users/jswaringen/)
 * (@jswaringen)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/unknown-error-ksort/)
 * I have an error that I can’t accept or reject. The error message is as follows:
 * Warning: ksort() expects parameter 1 to be array, null given in /home/jcsdevel/
   public_html/iwasjustwondering.us/wp-content/plugins/amp/includes/validation/class-
   amp-validation-error-taxonomy.php on line 418
 * Any clues to what I’m doing wrong?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funknown-error-ksort%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/unknown-error-ksort/#post-11613575)
 * [@jswaringen](https://wordpress.org/support/users/jswaringen/) It appears you
   are using v1.1.3, is that correct?
 * This exact same issue was reported in [https://github.com/ampproject/amp-wp/issues/2157](https://github.com/ampproject/amp-wp/issues/2157)
 * But should have been fixed in 1.1.1 via [https://github.com/ampproject/amp-wp/pull/2158](https://github.com/ampproject/amp-wp/pull/2158)
 * Apparently there are additional filters that may be corrupting the `term_description`
   field.
 * Are you filtering `pre_term_description` in any special way? Can you search among
   your plugins to see if that is being referenced?
 * This is the code in question:
 * [https://github.com/ampproject/amp-wp/blob/d8b0cac757c2cfeae384e522aea00ece0dee5a25/includes/validation/class-amp-validation-error-taxonomy.php#L2196-L2205](https://github.com/ampproject/amp-wp/blob/d8b0cac757c2cfeae384e522aea00ece0dee5a25/includes/validation/class-amp-validation-error-taxonomy.php#L2196-L2205)
 * and
 * [https://github.com/ampproject/amp-wp/blob/d8b0cac757c2cfeae384e522aea00ece0dee5a25/includes/validation/class-amp-validated-url-post-type.php#L655-L725](https://github.com/ampproject/amp-wp/blob/d8b0cac757c2cfeae384e522aea00ece0dee5a25/includes/validation/class-amp-validated-url-post-type.php#L655-L725)
 * The solution may be to remove _all_ filters not just the ones we know are causing
   problems.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/unknown-error-ksort/#post-11613580)
 * Are you able to run WP-CLI to obtain a list of the `description` fields for the`
   amp_validation_error` taxonomy? This will do it:
 * `wp term list amp_validation_error --field=description`
 * If you could paste that into a Gist that would help debug as well.
    -  This reply was modified 6 years, 10 months ago by [Weston Ruter](https://wordpress.org/support/users/westonruter/).
 *  Thread Starter [John Swaringen](https://wordpress.org/support/users/jswaringen/)
 * (@jswaringen)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/unknown-error-ksort/#post-11614001)
 * Thanks the reset on the wp-cli reset fixed it.
    -  This reply was modified 6 years, 10 months ago by [John Swaringen](https://wordpress.org/support/users/jswaringen/).
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [6 years, 10 months ago](https://wordpress.org/support/topic/unknown-error-ksort/#post-11614142)
 * The reset? I don’t understand. That command was just to list out the errors. 
   Are you getting an error when changing the status anymore?

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

The topic ‘Unknown Error Ksort()’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * Last activity: [6 years, 10 months ago](https://wordpress.org/support/topic/unknown-error-ksort/#post-11614142)
 * Status: resolved