mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-03 20:24:26 +00:00
Remove unnecessary checks before setting $wp_settings_* arrays. Adds unit test for setting a nonexistent variable to a multi-dimensional array.
Props scribu. Fixes #17884. git-svn-id: https://develop.svn.wordpress.org/trunk@25240 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -88,4 +88,15 @@ EOF;
|
||||
EOF;
|
||||
$this->assertEquals($expected, mask_input_value($in));
|
||||
}
|
||||
|
||||
function test_setting_nonexistent_arrays() {
|
||||
$page = 1;
|
||||
$field = 'settings';
|
||||
|
||||
error_reporting( -1 );
|
||||
|
||||
$empty_array[$page][$field] = 'foo';
|
||||
|
||||
unset( $empty_array[$page]['bar']['baz'] );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user