For clarity, initialize some arrays that previously were only assigned via short circuit in loops.

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@30982 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2014-12-20 22:46:53 +00:00
parent 91dcf8796b
commit 218dd4fd6b
15 changed files with 56 additions and 25 deletions

View File

@@ -308,6 +308,8 @@ function get_site_by_path( $domain, $path, $segments = null ) {
$path_segments = array_slice( $path_segments, 0, $segments );
}
$paths = array();
while ( count( $path_segments ) ) {
$paths[] = '/' . implode( '/', $path_segments ) . '/';
array_pop( $path_segments );