You are here

protected function DoubleQuoteWorkaround::process in Search API Solr 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/processor/DoubleQuoteWorkaround.php \Drupal\search_api_solr\Plugin\search_api\processor\DoubleQuoteWorkaround::process()
  2. 8.2 src/Plugin/search_api/processor/DoubleQuoteWorkaround.php \Drupal\search_api_solr\Plugin\search_api\processor\DoubleQuoteWorkaround::process()

File

src/Plugin/search_api/processor/DoubleQuoteWorkaround.php, line 77

Class

DoubleQuoteWorkaround
Replaces double quotes in field values and query.

Namespace

Drupal\search_api_solr\Plugin\search_api\processor

Code

protected function process(&$value) {

  // Do *not* turn a value of null into an empty string!
  if (is_string($value)) {
    $value = preg_replace('/"/u', $this->configuration['replacement'], $value);
  }
}