[wp-trac] [WordPress Trac] #34711: date_i18n bug with format M-t

WordPress Trac noreply at wordpress.org
Tue Apr 19 11:44:20 UTC 2016


#34711: date_i18n bug with format M-t
--------------------------+------------------------------
 Reporter:  liedekef      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  4.3.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by pbearne):

 The extra space, is added in the function before regx and then removed
 after

         {{{#!php
 <?php
 $dateformatstring = ' '.$dateformatstring;
 .....
 $dateformatstring = substr( $dateformatstring, 1, strlen(
 $dateformatstring ) -1 );

 }}}


 not saying this is weird and maybe wrong

 I can't see why we could create regx that doesn't need a leading space

 I am working on a more complete set of unit tests and will post patch for
 that later

 but this all work including your error

--
Ticket URL: <https://core.trac.wordpress.org/ticket/34711#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list