Changeset 56817
- Timestamp:
- 10/10/2023 12:50:19 PM (14 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/option.php
r56814 r56817 2904 2904 } 2905 2905 2906 $pos = array_search( $option_name, (array) $new_allowed_options[ $option_group ], true ); 2906 $pos = false; 2907 if ( isset( $new_allowed_options[ $option_group ] ) ) { 2908 $pos = array_search( $option_name, (array) $new_allowed_options[ $option_group ], true ); 2909 } 2907 2910 2908 2911 if ( false !== $pos ) { -
trunk/tests/phpunit/tests/option/registration.php
r53865 r56817 150 150 $this->assertFalse( has_filter( 'default_option_test_default', 'filter_default_option' ) ); 151 151 } 152 153 /** 154 * The test passes if a Notice | Warning | Error is not raised. Thus. the absence of a Notice | Warning | Error 155 * is an indicator the fix in the ticket resolves the issue. 156 * 157 * @ticket 57674 158 * 159 * @covers ::unregister_setting 160 */ 161 public function test_unregister_invalid_setting_does_not_raise_php_notice_warning_or_error() { 162 $setting = uniqid(); 163 unregister_setting( $setting, $setting ); 164 $this->assertFalse( has_filter( 'default_option_' . $setting, 'filter_default_option' ) ); 165 } 152 166 }
Note: See TracChangeset
for help on using the changeset viewer.