We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Version: 3.1
When $newKey exsits in $array and is positioned after $oldKey, Arrays::renameKey() preserves the value of $newKey over the value of $oldKey.
$newKey
$array
$oldKey
Arrays::renameKey()
use Nette\Utils\Arrays; $array = [ 0 => 0, 1 => 1 ]; $oldKey = 0; $newKey = 1; $renamedArray = [ $newKey => $array[ $oldKey ] ]; Arrays::renameKey( $array, $oldKey, $newKey ); var_dump( $array === $renamedArray ); // bool(false)
bool(true)
The text was updated successfully, but these errors were encountered:
b0edecd
Arrays::renameKey() fixed incorrect replacement for existing new keys […
1a569bf
…Closes #230]
a8637a0
12d57f5
No branches or pull requests
Version: 3.1
Bug Description
When
$newKey
exsits in$array
and is positioned after$oldKey
,Arrays::renameKey()
preserves the value of$newKey
over the value of$oldKey
.Steps To Reproduce
Expected Behavior
bool(true)
Possible Solution
The text was updated successfully, but these errors were encountered: