Support » Plugin: Content Scheduler » Fatal error

  • Resolved ahoramejor10


    Call to undefined method DateTime::add() in /home/xxxxxxxxxx/public_html/wp-content/plugins/content-scheduler/includes/DateUtilities.php on line 41

    After uograding to latest versions of WP and Content-scheduler I receive that fatal error.

    I have deactivated the pluggin but now I can not activate it as it gives the fatal error

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author Paul Kaiser


    Do you know what version of PHP is on your server?
    The DateTime class is only available in PHP versions 5.2 and newer.
    Please let me know so I can try helping out.

    Hi Paul:
    Its PHPMyAdmin version

    Plugin Author Paul Kaiser


    Thanks, but I need the version of PHP.
    PHPMyAdmin is just your web-based MySQL tool.
    If you can, on your webserver, create a new php file:
    In the file, put:


    Then, visit that new file in your browser, like maybe:

    That should tell you a lot, including the PHP version on your server.


    PHP version is 5.2.17. Hope it can help

    Plugin Author Paul Kaiser


    Please update to Content Scheduler 2.0.2, which I just updated to fix this problem. I was inadvertently developing using PHP 5.3, which includes the “add()” method in DateTime class.

    Let me know if this doesn’t work out for you.

    Im affraid it doesn’t.

    Call to undefined function array_replace() in /home/xxxxxxx/public_html/wp-content/plugins/content-scheduler/content-scheduler.php on line 221

    Plugin Author Paul Kaiser


    Sorry, I got in too much of a hurry.
    array_replace is another 5.3+ function.
    I’ve now replaced it and tested again.
    Please try Content Scheduler 2.0.3 when you can.

    Works fine, Paul.

    Thak you very much.

    Great support

    When i go to All posts in back-end i get this:

    Fatal error: Call to a member function setTimezone() on a non-object in /home/xxxxx/public_html/wp-content/plugins/content-scheduler/includes/DateUtilities.php on line 16

    PHP version: 5.3.26
    Content Sceduler version: 2.0.3

    Plugin Author Paul Kaiser


    Thanks for the bug report, and for including version numbers.
    I’ve added more error checking to the DateUtilities class to head this off before erroring out.

    That said, I’m not sure why setTimezone failed on you. Basically it couldn’t construct a DateTime object with the given unix timestamp.

    I’m wondering if you updated Content Scheduler, but did not Deactivate / Reactivate it? In these latest updates, I made changes to how the expiration date and time are stored, and when you Activate the plugin it checks for / migrates any existing timestamps you might have stored.

    Anyway, please check out version 2.0.4, just uploaded, and let me know if problems persist or if you have any other requests.

    Happy Holidays.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Fatal error’ is closed to new replies.