date() expects parameter 2 to be long, string given in .../sites/all/modules/scheduler/scheduler.module on line 599.

This seems to be preventing my users from using Scheduler. I'm still trying to figure out what they are doing.

Comments

nancydru’s picture

Priority: Normal » Major

This is happening on "Preview." No dates were given, so it's choking on an empty string.

nancydru’s picture

Status: Active » Needs review

This seems to fix it:

  if (!empty($node->publish_on)) {
    $variables['publish_on'] = date($date_format, $node->publish_on);
  }
  if (!empty($node->unpublish_on)) {
    $variables['unpublish_on'] = date($date_format, $node->unpublish_on);
  }

I just changed isset to !empty.

eric-alexander schaefer’s picture

scheduler.module release 6.x-1.7 only contains 586 lines and 6.x-1.x-dev does not contain a call to date() in line 599.
Also I cannot find the code snippet you posted in #2. What version of scheduler are you using?

nancydru’s picture

According to the module admin page, 6.x-1.7.
// $Id: scheduler.module,v 1.50.2.36 2010/05/02 16:36:06 ericschaefer Exp $

This is in "function scheduler_preprocess_node"

nancydru’s picture

Status: Needs review » Fixed
eric-alexander schaefer’s picture

I guess I should include your patch from #840814: Theme variables real soon now...

nancydru’s picture

That would be nice.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.