[wp-trac] [WordPress Trac] #31553: number_format_i18n() can cause a PHP notice if $wp_locale is not set

WordPress Trac noreply at wordpress.org
Sat Mar 7 20:54:38 UTC 2015


#31553: number_format_i18n() can cause a PHP notice if $wp_locale is not set
-----------------------------------------+------------------------------
 Reporter:  pauldewouters                |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  Awaiting Review
Component:  I18N                         |     Version:  trunk
 Severity:  normal                       |  Resolution:
 Keywords:  has-patch reporter-feedback  |     Focuses:
-----------------------------------------+------------------------------
Changes (by DrewAPicture):

 * keywords:   => has-patch reporter-feedback


Comment:

 Hi Paul, thanks for the patch.

 The only issue here is really that the function specifically serves to
 convert a number '''based''' on the locale. So while the `is_object()`
 check would solve the problem, I'd be curious to know what your use case
 is where `$wp_locale` would not be set.

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


More information about the wp-trac mailing list