I use Drpual 6.8, and have the latest EVENTS module installed. It was working beautifully until today, when it started showing this error message:

warning: date_parse() expects parameter 1 to be string, array given in /home/scaryp/public_html/modules/event/event.module on line 2788.
warning: date_parse() expects parameter 1 to be string, array given in /home/scaryp/public_html/modules/event/event.module on line 2788.
warning: date_parse() expects parameter 1 to be string, array given in /home/scaryp/public_html/modules/event/event.module on line 2788

It does not show the date of the event in the node, no matter how i configure the date and time, always showing it as 0/0/00

Any ideas? Nothing changed since last night, so not sure what's up! Anyone else gotten this error message?

Comments

gerhard killesreiter’s picture

Status: Active » Postponed (maintainer needs more info)

when did you download event.module?

Which action do you do when you get this error?

Superheidi’s picture

I downloaded it about one week ago, and after I got this message I went back to the module page and re-downloaded and installed it, to make sure nothing had gotten lost in my first installation.

I get the error message when I attempt to add in a time and date for a new 'event' content type to be posted. When I preview the event before 'saving', the time shows as zero and the error message appears above the event body.

weird, !

Superheidi’s picture

the place in events.module that it is saying has a problem is:

function event_explode_date($date) {
if (function_exists('date_parse')) {
$date = date_parse($date);
$return = array();
$return['year'] = $date['year'];
$return['month'] = str_pad($date['month'], 2, '0', STR_PAD_LEFT);
$return['day'] = str_pad($date['day'], 2, '0', STR_PAD_LEFT);
$return['hour'] = str_pad($date['hour'], 2, '0', STR_PAD_LEFT);
$return['minute'] = str_pad($date['minute'], 2, '0', STR_PAD_LEFT);
$return['second'] = str_pad($date['second'], 2, '0', STR_PAD_LEFT);
return $return;
}

line 2788 specifically in the above is:

$date = date_parse($date);

any thoughts? error occurs only when I attempt to program in a new event.

japerry’s picture

Status: Postponed (maintainer needs more info) » Closed (outdated)

Event for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.