Skip to content

Commit

Permalink
Make sure $results is an array before trying to get its values
Browse files Browse the repository at this point in the history
  • Loading branch information
danielbachhuber committed Aug 17, 2020
1 parent b9f30ed commit 0e9f5ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion object-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,7 @@ public function get_multiple( $keys, $group = 'default', $force = false ) {
if ( $this->_should_use_redis_hashes( $group ) ) {
$redis_safe_group = $this->_key( '', $group );
$results = $this->_call_redis( 'hmGet', $redis_safe_group, $remaining_keys );
$results = array_values( $results );
$results = is_array( $results ) ? array_values( $results ) : $results;
} else {
$ids = array();
foreach ( $remaining_keys as $key ) {
Expand Down

0 comments on commit 0e9f5ae

Please sign in to comment.