[wp-trac] [WordPress Trac] #43304: Data type of deprecated parameter of load_plugin_textdomain function should be bool and not string

WordPress Trac noreply at wordpress.org
Fri Apr 19 12:03:14 UTC 2019


#43304: Data type of deprecated parameter of load_plugin_textdomain function should
be bool and not string
-------------------------+-----------------------------
 Reporter:  sudar        |       Owner:  (none)
     Type:  enhancement  |      Status:  new
 Priority:  low          |   Milestone:  Future Release
Component:  I18N         |     Version:
 Severity:  minor        |  Resolution:
 Keywords:  has-patch    |     Focuses:  docs
-------------------------+-----------------------------

Comment (by sudar):

 @swissspidy

 > If anything I'd annotate it as `string|false`,

 I have added a new patch that changes the param type to `string|false`
 instead of just `false`.

 > but I don't see it as a pressing problem.

 Here is a usecase that prompted me to create this ticket and also submit
 the patch.

 I am using `load_plugin_textdomain` function in a plugin and I have to use
 set a value for the 3rd parameter, which means I have to explicitly set
 the second parameter to `false`.

 Now when I set the second parameter to `false` both the IDE and static
 code analyser starts to flag the function call saying that a bool value is
 passed to string parameter.

 I agree that it may not be a pressing problem, but it is still a minor
 annoyance for all the developers who have to use the call the function and
 specify the 3rd parameter.

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


More information about the wp-trac mailing list