Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the "URL field" processor's addFieldValues()
method, we currently have the following code:
$fields = $this->getFieldsHelper()
->filterForPropertyPath($item->getFields(), NULL, 'search_api_url');
foreach ($fields as $field) {
if (!$field->getDatasourceId()) {
$field->addValue($url->toString());
}
}
The if
check in the foreach
loop is unnecessary, as filterForPropertyPath()
will already check for that (NULL
there is treated as any other $datasource_id
, not as "all values").
Comment | File | Size | Author |
---|---|---|---|
#3 | 2881945-3--add_url_unnecessary_check.patch | 826 bytes | drunken monkey |
|
Comments
Comment #2
drunken monkeyComment #3
drunken monkeyCome to think of it …
Comment #4
borisson_Looks good to me, thanks @drunken monkey!
Comment #6
drunken monkeyGood to hear, thanks for reviewing!
Committed.