Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions php/traits/trait-params.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,15 @@ protected function set_param_array( $parts, $param, $value ) {
return $new;
}

if ( '' === $key ) {
$new[] = $value;
if ( is_array( $new ) ) {
if ( '' === $key ) {
$new[] = $value;
} else {
$new[ $key ] = $value;
}
} else {
$new[ $key ] = $value;
// There's likely a problem here, as we're setting an array key on a non-array.
$new = array();
}
// @TODO: I took ksort out, need to check that it doesn't have any problems being.

Expand Down