After installing this module, and trying to play with it by creating a new node I am getting this error message on the node/add page:
warning: date() expects parameter 2 to be long, string given in sites/all/modules/scribeseo/scribeseo.module on line 190.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | scribeseo-date-function-issues-6.x-1.0-rc6-972236-3.patch | 1.05 KB | leksat |
Comments
Comment #1
stevethewebguy commentedYou can replace line 190:
'#value' => $credits['remaining'] . ' ' . t('evaluations as of ') . date('F j, Y, g:i a', $credits['time']),With:
'#value' => $credits['remaining'] . ' ' . t('evaluations as of ') . date('F j, Y, g:i a', strtotime($credits['time'])),Comment #2
Dustin Currie commenteddate() shouldn't be used in Drupal at all. Use drupal's format_date() instead. It will give you offsets for the site or user timezone and language translation.
http://api.drupal.org/api/drupal/includes--common.inc/function/format_da...
date('F j, Y, g:i a', strtotime($credits['time'])) should be
format_date(strtotime($credits['time']), 'custom', 'F j, Y, g:i a');
or better yet:
format_date(strtotime($credits['time']), 'medium');
Comment #3
leksat commentedComment #4
randallknutson commentedThanks for the patch. It has been applied in rc7.