Support » Plugin: Schema - All In One Schema Rich Snippets » Infinite loop in check_snippet_existence()

  • Resolved matt_fw


    In functions.php there’s a line:
    This line adds an action with an empty string (”) as a priority. WP documentation states that this must be an integer but happily accepts it anyway. Under some circumstances, this leads to an infinite loop in WP_Hook::apply_filters(). In check_snippet_existence() there’s a call to add another action to ‘wp_head’ hook. This triggers WP_Hook::resort_active_iterations() which expects priorities to be integers. Due to the fact how PHP treats “” (it’s zero-ish value) certain checks in the method no longer make sense, for example "" < 0 is false ($current < $min in the code). This leads to reset on internal array pointer of WP_Hook::$iterations, which in effect may lead to infinite loop inside WP_Hook::apply_filters().

    Please patch the plugin and just use an integer as a priority.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Infinite loop in check_snippet_existence()’ is closed to new replies.