Support » Plugin: WP Document Revisions » [Plugin: WP Document Revisions] Error: date() expects parameter 2 to be long, string given

  • Resolved grex22

    (@grex22)


    I’m getting an error across the top of the admin screen on a fresh install of this plugin when visiting the Add New Document page. Error details are below:

    Warning: date() expects parameter 2 to be long, string given in {my actual path edited out}/wp-content/plugins/wp-document-revisions/wp-document-revisions.php on line 441

    Thoughts? Anyone have a fix for this?

    http://wordpress.org/extend/plugins/wp-document-revisions/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hmm.. Well, I seem to have found a fix, but not positive if this is correct or not.

    I changed line 441 from:

    $post->post_date = date( ‘Y-m-d H:i:s’, get_post_modified_time( ‘U’, null, $postID ) );

    To:

    $post->post_date = date( ‘Y-m-d H:i:s’, (int)get_post_modified_time( ‘U’, null, $postID ) );

    Maybe the developer can weigh in?

    Plugin Author Ben Balter

    (@benbalter)

    That’s very odd. Would it be possible to capture the string it is returning? That function gets passed through mysql2date() which is specifically designed to format dates for the date() function.

    on line 440 or so, something like: var_dump( get_post_modified_time( 'U', null, $postID ) );

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP Document Revisions] Error: date() expects parameter 2 to be long, string given’ is closed to new replies.