• It seems that the mysql2date() function in “functions.php” is only meant to accept full date vals like “2005-01-06 08:04:36”, but with the latest nightly, it sometimes receives time-serial values instead like “1105027476”.

    Obviously, this is causing a few errors to appear anywhere the post time is shown ?? Oddly, the comment times are unaffected…

Viewing 13 replies - 1 through 13 (of 13 total)
  • Thread Starter rustindy

    (@rustindy)

    Quick hack-fix for “/wp-includes/functions.php”:

    Change the line

    $i = mktime(substr($m,11,2),substr($m,14,2),substr($m,17,2),substr($m,5,2),substr($m,8,2),substr($m,0,4));

    to read

    if (strlen($m) > 17) {
    $i = mktime(substr($m,11,2),substr($m,14,2),substr($m,17,2),substr($m,5,2),substr($m,8,2),substr($m,0,4));
    } else {
    $i = $m;
    }

    It’s an ugly hack, but it’s quick and it works ??

    Looks like I’m not the only one affected ?? Phew.

    LMAO, i did the exact thing when i saw this, then was bout to post it when you did, GRRRR! ::shakesx fist::

    Thread Starter rustindy

    (@rustindy)

    Hehe ?? Keep an eye on https://codex.www.ads-software.com/Changelog/1.5 for nightly changelogs too, should be a good help if you’re updating your files regularly.

    ^^ thats how I been doing it! Great resource!

    Guys, i have changed the link on fuctions.php but it still says on my news

    December 31st, 1969
    instead of December 31st, 2004

    url: https://www.justshannen.com/fansite

    OK! Problem has been fixed!
    I just have to post-again a message, a new one so, all past messages change from year 1969 to 2004 or 2005! FIXED, thanks! ??

    Thread Starter rustindy

    (@rustindy)

    That’s because your host is running a *nix server. A windows server can only go back to 00:00:01 Jan 1 1970 – using PHP’s mktime() function on smaller dates gives an error about using negative numbers in the function.

    I think.

    Check that codex link posted above after the nightly gets on the download page – if I find a show-stopper bug or something very obvious to a viewer, it’ll be listed there. In general, avoid using the 1.5 nightly if there’s a known, obvious bug ?? The Jan7 nightly didn’t have the problem.

    Do you guys run upgrade.php after you update the files from the nightly?

    Thread Starter rustindy

    (@rustindy)

    I haven’t been usually, no. But I did finally on the Jan7 nightly since it seemed so much had changed. Just seemed like a good idea ??

    I don’t think that running “upgrade.php” when you don’t need to will hurt anything though, so it’s safe to run it whenever you update the WP files. Usually you won’t need to though.

    If a nightly comes out that requires running “upgrade.php”, it’ll be noted in the codex’s 1.5 changelog page.

    The above fix didn’t work for me. Maybe I’m just stupid though. I *do* typically run upgrade.php and I have this time as well. Anyone know if a fix is in CVS yet?

    Thread Starter rustindy

    (@rustindy)

    You’re getting errors instead of the article post date on your pages and in the admin section? That’s all the fix above does – it just checks to see if the function is being sent a date or a dateserial and fills $i appropriately so that it ends up being a dateserial.

    I’m hoping the Jan9 nightly will either fix the function, or fix the function that calls it. This function (above) can currently only take a full date as a value, not a dateserial.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘01-08 Nightly – big, bad booboo’ is closed to new replies.