I'm getting the following warning when running cron:

warning: date_default_timezone_set() expects parameter 1 to be string, object given in apachesolr_biblio.module on line 101.

The reason for this is that on line 60, a call is made to date_default_timezone_get(), which returns an object. On line 101, you are setting the default timezone, which expects a string as the first argument.

The attached patch calls date_default_timezone_name() instead, which returns a string that can be used to set the default timezone.

Comments

ebeyrent’s picture

Status: Active » Needs review
narnou’s picture

Status: Needs review » Patch (to be ported)

This worked for me, thanks !

mvc’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

this worked for me, thanks!

however i noticed that date_api needs to be added as a dependency in the .info file, to make sure these functions can be called.

j0nathan’s picture

Subscribing.

j0nathan’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1003 bytes

Here is a patch with #3 and #0.

mvc’s picture

Status: Needs review » Reviewed & tested by the community

thanks, jonathan.