IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
|
|
|
388 | 388 | else |
389 | 389 | unset($redirect['port']); |
390 | 390 | |
391 | | // trailing /index.php |
392 | | $redirect['path'] = preg_replace('|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path']); |
| 391 | // Redirect can be missing path key caused by failed (and suppressed) parse_url calls. |
| 392 | if ( empty( $redirect['path'] ) ) { |
| 393 | $redirect['path'] = ''; |
| 394 | } |
| 395 | |
| 396 | // We don't need to initiate a regular expression call if the path is empty. |
| 397 | if ( ! empty( $redirect['path'] ) ) { |
| 398 | // trailing /index.php |
| 399 | $redirect['path'] = preg_replace( '|/' . preg_quote( $wp_rewrite->index, '|' ) . '/*?$|', '/', $redirect['path'] ); |
| 400 | } |
393 | 401 | |
394 | 402 | $punctuation_pattern = implode( '|', array_map( 'preg_quote', array( |
395 | 403 | ' ', '%20', // space |