Problem/Motivation
When using settings that specify multiple servers per cluster, but do not specify the 'bins' setting, we get this error:
Uncaught PHP Exception TypeError: "sort(): Argument #1 ($array) must be of type array, null given" at /PATH/TO/docroot/modules/contrib/memcache/memcache_admin/src/Controller/MemcacheStatisticsController.php line 177
Steps to reproduce
Set the memcache settings to this in settings.php
$conf['memcache_servers'] = ['127.0.0.1:11211' => 'default', 'localhost:11211' => 'default'];
Enable the memcache_admin module and go to http://MYSITE/admin/reports/memcache
Proposed resolution
Not sure yet. Possibly MemcacheStatisticsController.php needs to be fixed, so that this if() statement:
if (isset($bins_settings)) {
actually envelops more code, so that when it's false, it wouldn't eventually run the sort() and the rest.
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
shawn dearmond commentedI'm seeing this as well.
Comment #5
janusman commentedMR looks good! My http://MYSITE/admin/reports/memcache page went from throwing PHP fatals to showing actual results.
Comment #7
japerryAwesome! Fixed.