[CMSP-459] bugfix: re-add missing else#437
Conversation
Can you link? Was this #428? |
} else { // tcp connection.
$port = ! empty( $redis_server['port'] ) ? $redis_server['port'] : 6379;
}We can make improvements, but this is just to get us back to the baseline working. Any additional changes should (IMO) be in a separate PR. And you can see in #430 that without this change, the tests are failing. |
+1 on the simpler fix first and ignore my second comment, ternary operator w/ fallback is still unnecessary if $port has a default value at the top of the func |
|
@pwtyler There is a chance that the $redis_server = [
'host' => '127.0.0.1',
'database' => 0,
];
$params = build_client_parameters( $redis_server );In that case, |
e2a8ee2 to
4b56952
Compare
* Reverts this incorrect change that was made due to the incorrect use of `array_replace_recursive()`.
|
@jazzsequence & @pwtyler just noting that this change was actually incorrectly made as the real issue was the misused of |
* Reverts this incorrect change that was made due to the incorrect use of `array_replace_recursive()`.
…er issues (#434) * fix: Fixes incorrect order of array_replace_recursive arguments & other issues * Fixes #433 * Fixes #432 * Fixes #431 * Further clean-up & standardization between object-cache.php & wp-redis.php. * Fixes incorrect order of array_replace_recursive arguments. * Addresses issue with port still not being null for socket connections due to defaults array_repalce_recursive use. * fix: Fixes sanitization methods and linting issues * Adjusts some items to use type-based sanitization. * Adds linting expection handling with comments for cases that require it. * fix: Removes invalid change made in #437 * Reverts this incorrect change that was made due to the incorrect use of `array_replace_recursive()`. * update changelog * Update wp-redis.php * update language in changelogs * fix missing closing ) --------- Co-authored-by: Chris Reynolds <[email protected]> Co-authored-by: Phil Tyler <[email protected]>
* re-add missing else * use the already-defined value of $port instead of hard-coding * remove ternary in favor of elseif
…er issues (#434) * fix: Fixes incorrect order of array_replace_recursive arguments & other issues * Fixes #433 * Fixes #432 * Fixes #431 * Further clean-up & standardization between object-cache.php & wp-redis.php. * Fixes incorrect order of array_replace_recursive arguments. * Addresses issue with port still not being null for socket connections due to defaults array_repalce_recursive use. * fix: Fixes sanitization methods and linting issues * Adjusts some items to use type-based sanitization. * Adds linting expection handling with comments for cases that require it. * fix: Removes invalid change made in #437 * Reverts this incorrect change that was made due to the incorrect use of `array_replace_recursive()`. * update changelog * Update wp-redis.php * update language in changelogs * fix missing closing ) --------- Co-authored-by: Chris Reynolds <[email protected]> Co-authored-by: Phil Tyler <[email protected]>
* re-add missing else * use the already-defined value of $port instead of hard-coding * remove ternary in favor of elseif
…er issues (pantheon-systems#434) * fix: Fixes incorrect order of array_replace_recursive arguments & other issues * Fixes pantheon-systems#433 * Fixes pantheon-systems#432 * Fixes pantheon-systems#431 * Further clean-up & standardization between object-cache.php & wp-redis.php. * Fixes incorrect order of array_replace_recursive arguments. * Addresses issue with port still not being null for socket connections due to defaults array_repalce_recursive use. * fix: Fixes sanitization methods and linting issues * Adjusts some items to use type-based sanitization. * Adds linting expection handling with comments for cases that require it. * fix: Removes invalid change made in pantheon-systems#437 * Reverts this incorrect change that was made due to the incorrect use of `array_replace_recursive()`. * update changelog * Update wp-redis.php * update language in changelogs * fix missing closing ) --------- Co-authored-by: Chris Reynolds <[email protected]> Co-authored-by: Phil Tyler <[email protected]>
This re-adds the else statement that was inadvertently missed in a recent commit, leading to some of the Behat test failures.
This, as well as #430 account for all of the environment fixes that were mixed into #426 but separate from the actual change suggested in that PR.
Tests can be seen as passing (with #430) here: https://app.circleci.com/pipelines/github/pantheon-systems/wp-redis/1629/workflows/fd714abf-075f-45f8-9102-3ddc730f731e/jobs/4980