for me adding
global $configLevel
at line 414 in
/var/www/imscp/gui/plugins/PhpSwitcher/frontend/client/phpswitcher.php
helps
(or maybe move the $configLevel part in front of file)
##
@@ -411,6 +411,7 @@
iMSCP_Events::onClientScriptStart
);
customerHasFeature('php') or showNotFoundErrorPage();
+global $configLevel;
$configLevel = (new iMSCP_Config_Handler_File(
iMSCP_Registry::get('config')['CONF_DIR'] . '/php/php.data'
))['PHP_CONFIG_LEVEL'];