Changeset 58066
- Timestamp:
- 04/30/2024 09:45:39 AM (8 months ago)
- Location:
- branches/6.5
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/6.5
-
branches/6.5/src/wp-includes/l10n.php
r57639 r58066 729 729 $l10n_unloaded = (array) $l10n_unloaded; 730 730 731 if ( ! is_string( $domain ) ) { 732 return false; 733 } 734 731 735 /** 732 736 * Filters whether to short-circuit loading .mo file. … … 990 994 global $wp_textdomain_registry; 991 995 996 if ( ! is_string( $domain ) ) { 997 return false; 998 } 999 992 1000 /** 993 1001 * Filters a plugin's locale. … … 1038 1046 global $wp_textdomain_registry; 1039 1047 1048 if ( ! is_string( $domain ) ) { 1049 return false; 1050 } 1051 1040 1052 /** This filter is documented in wp-includes/l10n.php */ 1041 1053 $locale = apply_filters( 'plugin_locale', determine_locale(), $domain ); … … 1076 1088 /** @var WP_Textdomain_Registry $wp_textdomain_registry */ 1077 1089 global $wp_textdomain_registry; 1090 1091 if ( ! is_string( $domain ) ) { 1092 return false; 1093 } 1078 1094 1079 1095 /** -
branches/6.5/tests/phpunit/tests/l10n/loadTextdomain.php
r55928 r58066 317 317 $this->assertSame( 0, $override_load_textdomain_callback->get_call_count(), 'Expected override_load_textdomain not to be called.' ); 318 318 } 319 320 /** 321 * @ticket 60888 322 * @covers ::load_plugin_textdomain 323 */ 324 public function test_load_plugin_textdomain_invalid_domain() { 325 $this->assertFalse( load_plugin_textdomain( null ) ); 326 } 327 328 /** 329 * @ticket 60888 330 * @covers ::load_muplugin_textdomain 331 */ 332 public function test_load_muplugin_textdomain_invalid_domain() { 333 $this->assertFalse( load_muplugin_textdomain( null ) ); 334 } 335 336 /** 337 * @ticket 60888 338 * @covers ::load_theme_textdomain 339 */ 340 public function test_load_theme_textdomain_invalid_domain() { 341 $this->assertFalse( load_theme_textdomain( null ) ); 342 } 343 344 /** 345 * @ticket 60888 346 * @covers ::load_textdomain 347 */ 348 public function test_load_textdomain_invalid_domain() { 349 $this->assertFalse( load_textdomain( null, DIR_TESTDATA . '/pomo/thisfiledoesnotexist.mo' ) ); 350 } 319 351 }
Note: See TracChangeset
for help on using the changeset viewer.