WordPress.org

Ready to get started?Download WordPress

Forums

WP Dummy Content
Fatal Error when trying to create pages or posts (4 posts)

  1. quietcity
    Member
    Posted 3 years ago #

    Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct() [datetime.--construct]: Failed to parse time string (1292390312) at position 8 (1): Unexpected character' in F:\WAMP\www\wordpress\wp-includes\formatting.php:1582 Stack trace: #0 F:\WAMP\www\wordpress\wp-includes\formatting.php(1582): DateTime->__construct('1292390312') #1 F:\WAMP\www\wordpress\wp-content\plugins\wp-dummy-content\lib.php(122): get_gmt_from_date(1292390312) #2 F:\WAMP\www\wordpress\wp-content\plugins\wp-dummy-content\lib.php(32): insert_page('Duke and the Ki...', 'Presently she s...', 0, 'full-width.php', 'publish', Array) #3 F:\WAMP\www\wordpress\wp-content\plugins\wp-dummy-content\wp-dummy-content.php(37): create_stuff(Array) #4 [internal function]: dummy_content_admin('') #5 F:\WAMP\www\wordpress\wp-includes\plugin.php(395): call_user_func_array('dummy_content_a...', Array) #6 F:\WAMP\www\wordpress\wp-admin\admin.php(138): do_action('settings_page_w...') #7 F:\WAMP\www\wordpress\wp-admin\ in F:\WAMP\www\wordpress\wp-includes\formatting.php on line 1582

  2. billsmithem
    Member
    Posted 3 years ago #

    Same issue. Still broken.

    The error is in lib.php. The calls to get_gmt_from_date(time()) are wrong and should be get_gmt_from_date(date('Y-m-d H:i:s'))

  3. ywickham
    Member
    Posted 3 years ago #

    Plugin still broken.

  4. gruvii
    Member
    Posted 3 years ago #

    billsmithem is correct, this fix works until skeevis fixes it.

    Change lines 122, 128 295, 302 in lib.php

    FROM
    $query .= ", '" . get_gmt_from_date($date) . "'";

    TO
    $query .= ", '" . get_gmt_from_date(date('Y-m-d H:i:s')) . "'";

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic