Plugin Directory

Changeset 2394890


Ignore:
Timestamp:
10/07/2020 12:45:07 AM (5 years ago)
Author:
mokimoki
Message:

Fix problem with too long arguments for levenshtein function.

Location:
open-wp-seo
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • open-wp-seo/tags/1.0.1/modules/open-wp-seo-content.php

    r2205467 r2394890  
    2222            foreach ($content_words as $content_word) {
    2323                $content_word = $this->remove_special_characters($content_word);
    24                 if (levenshtein($title_word, $content_word) < 4) {
     24                if (levenshtein(substr($title_word, 0, 255), substr($content_word, 0, 255)) < 4) {
    2525                    $title_words_in_content++;
    2626                    break;
  • open-wp-seo/trunk/modules/open-wp-seo-content.php

    r2205467 r2394890  
    2222            foreach ($content_words as $content_word) {
    2323                $content_word = $this->remove_special_characters($content_word);
    24                 if (levenshtein($title_word, $content_word) < 4) {
     24                if (levenshtein(substr($title_word, 0, 255), substr($content_word, 0, 255)) < 4) {
    2525                    $title_words_in_content++;
    2626                    break;
Note: See TracChangeset for help on using the changeset viewer.