if ($author_string == '') { return $detectedAuthors; } // detecting known duplicates foreach ($this->fpa_duplicates as $known_duplicate) { foreach ($known_duplicate['names'] as $known_name) { if (preg_match('/' . preg_quote($known_name, '/') . '/', $author_string)) { $author_string = preg_replace('/' . preg_quote($known_name, '/') . '/', $known_duplicate['ends'], $author_string); } } } // detecting inline multiple authors foreach ($this->fpa_separators as $separator) { $found_authors = explode($separator, $author_string); if (sizeof($found_authors) > 1) { foreach ($found_authors as $author) { $detectedAuthors[] = trim($author); } break; } } if (sizeof($detectedAuthors) == 0) { return [trim($author_string)]; } else { return $detectedAuthors; } } } $db_updater = new DatabaseUpdater(); $db_updater->verifyAndUpdatePlugins();