Automattic / wp-memcached

Memcached Object Cache for WordPress.
https://wordpress.org/plugins/memcached/
GNU General Public License v2.0
157 stars 55 forks source link

Fix "Undefined offset: 1" when no port specified #93

Closed sjinks closed 2 years ago

sjinks commented 2 years ago

If $server is specified without the port (relying upon memcache.default_port), the code spits a notice "Undefined offset: 1". This PR fixes that notice.

codecov[bot] commented 2 years ago

Codecov Report

Merging #93 (00fdb84) into master (08feac1) will increase coverage by 0.18%. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##             master      #93      +/-   ##
============================================
+ Coverage     76.08%   76.26%   +0.18%     
  Complexity      138      138              
============================================
  Files             1        1              
  Lines           439      434       -5     
============================================
- Hits            334      331       -3     
+ Misses          105      103       -2     
Flag Coverage Δ
unittests 76.26% <100.00%> (+0.18%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
object-cache.php 76.26% <100.00%> (+0.18%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 08feac1...00fdb84. Read the comment docs.