• Resolved reflexiv

    (@rheck)


    I just upgraded to 2.0.3 from 2.0.2 and now my blog at https://nakba48.org has the character ‘{1}’ prefixed to the date of all my posts, e.g. {1}June 1st, 2006. I am using a custom theme but utilizing the same time function as the default template: <?php the_time(‘F jS, Y’) ?>.

    Also, I just upgraded from a completely new and unmodified (no plugins or anything) 2.0.2 install on another blog at https://studentsforahumansociety.org/index.php and it appears to be doing the same thing. Has anyone else seen this before or possibly point me in the right direction? Thanks!

Viewing 15 replies - 1 through 15 (of 19 total)
  • I’m experiencing the same problem.

    I think it’s related to ticket #2564, which was included in the 2.0.3 release, but I don’t know why this is happening.

    Edit: my date format is: “j F Y”

    I’ve changed the fixes from that ticket back to the way they were in 2.0.2 and that solved the issue for me.

    I think it’s a ‘useless’ fix anyway, because I don’t know of any regional setting where the name of a day or a month (see below) start with a literal number, thus making the fix void anyhow, except maybe for esthetics.

    The replace takes place on:
    D (A textual representation of a day, three letters)
    F (A full textual representation of a month, such as January or March)
    l (A full textual representation of the day of the week)
    M (A short textual representation of a month, three letters)

    Thread Starter reflexiv

    (@rheck)

    Thanks for bring that ticket to my attention Nazgul, I didn’t think to search there. I reverted back the ‘fix’ and it seems to be working now for me as well.

    Same problem here. Reverted the “fix” just like Nazgul and all is well now.

    Good find Naz.

    What version of PHP are you all running?

    As far as I can tell from (https://uk.php.net/preg_replace) the \{1} format for referring to backreferences in the regular expressions should work fine on PHP 4.0.4.

    I’m running on PHP 4.1.2 and my PCRE library version, specified in phpinfo, is 3.4 22-Aug-2000.

    I found the following when I did a diff on wp-includes/functions.php. The 2.0.3 version is on top, the previous version is on bottom:

    Starting around line 35 or so in functions.php and continuing for about 5 lines are \${1} in the function call. In the previous version, it was \\1.

    Changing the \${1} to \\1, as it was in the previous version fixed things. I’m running PHP 4.1.2.

    Did the above mod – worked for me too! Thanks!

    Using php 4.2.2
    mysql 4.1.18
    Apache 2.0.40

    Nazgul, this related ticket confirms that some regional settings do need this change.

    Adding to the chorus, this fixed my problems as well using PHP 4.2.2

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    As far as I can tell from (https://uk.php.net/preg_replace) the \{1} format for referring to backreferences in the regular expressions should work fine on PHP 4.0.4.

    Nope. PHP 4.0.4 added the ability to use $ddd backreferences, but the “perl-style” of ${ddd} was not added until PHP 4.3.0.

    From here: https://www.php.net/ChangeLog-4.php
    Added ability to use Perl-style ${n} subpattern references in the replacement string for preg_replace() (bug #18442). (Andrei)

    So the short of it is: Upgrade your copy of PHP, for crying out loud! ??

    If you need at least 4.3.0 to get this to work, somebody should also update the Requirements page, because there it says at least 4.2.0.

    But I’m not in a position to upgrade my PHP version, so I’ll just have to live with my ‘hack’ in this, and possible future versions, for now.

    The hack seems to work OK – I’m not particularly familiar with php – what was the change meant to implement?

    The “\\1” fix helped my site out.

    Thanks!

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    what was the change meant to implement?

    It’s a bugfix that is mostly intended for Non-English users. It won’t impact English users *if* they have a version of PHP later than 4.3.0.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘‘{1}’ prefixed to the date of all posts after 2.0.3 upgrade’ is closed to new replies.