Hi,

I have noticed that in my site the watchdog logs get a lot of entries like:

Warning: preg_match() expects parameter 2 to be string, array given en SarniaSolrService->extractResults() (línea 485 de "PATH_TO_MODULES"/sarnia/service.inc).

The problem is that when the field is indexed in solr in this type:

<dynamicField name="dm_*" type="date" indexed="true" stored="true" multiValued="true"/>

It is not a string, it is an array and the next instruction throws that warning:

preg_match('/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z$/', $result['fields'][$search_api_property]

I have created a patch that will upload to this issue in case somebody else is in the same situation as I am.

Sorry for my english!

CommentFileSizeAuthor
#2 2914869-warning_date_multiple.patch1.66 KBmpando
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mpando created an issue. See original summary.

mpando’s picture

  • jmdeleon committed cb7f4d5 on 7.x-1.x authored by mpando
    Issue #2914869 by mpando: Warnings about date field
    
jmdeleon’s picture

Status: Active » Fixed
jmdeleon’s picture

Status: Fixed » Closed (fixed)