Changeset 52294 for trunk/src/wp-includes/formatting.php
- Timestamp:
- 11/30/2021 09:00:32 PM (5 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/formatting.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/formatting.php
r52292 r52294 4712 4712 4713 4713 $original_value = $value; 4714 $error = '';4714 $error = null; 4715 4715 4716 4716 switch ( $option ) { … … 4920 4920 } 4921 4921 4922 if ( 'permalink_structure' === $option && '' !== $value && ! preg_match( '/%[^\/%]+%/', $value ) ) { 4922 if ( 'permalink_structure' === $option && null === $error 4923 && '' !== $value && ! preg_match( '/%[^\/%]+%/', $value ) 4924 ) { 4923 4925 $error = sprintf( 4924 4926 /* translators: %s: Documentation URL. */ … … 4949 4951 } 4950 4952 4951 if ( ! empty( $error ) ) { 4953 if ( null !== $error ) { 4954 if ( '' === $error && is_wp_error( $value ) ) { 4955 /* translators: 1: Option name, 2: Error code. */ 4956 $error = sprintf( __( 'Could not sanitize the %1$s option. Error code: %2$s' ), $option, $value->get_error_code() ); 4957 } 4958 4952 4959 $value = get_option( $option ); 4953 4960 if ( function_exists( 'add_settings_error' ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)