This change should work as well as before, and it's more correct. However,
it's not a full fix making the badge-editor work in D8 - the relevant code
probably needs more of a rethink. But... this is cleaner...
$resources = CRM_Core_Resources::singleton();
$resources->addSetting(
[
- 'kcfinderPath' => $config->userFrameworkResourceURL . 'packages' . DIRECTORY_SEPARATOR,
+ 'kcfinderPath' => CRM_Utils_File::addTrailingSlash(Civi::paths()->getVariable('civicrm.packages', 'url'), '/'),
]
);
$resources->addScriptFile('civicrm', 'templates/CRM/Badge/Form/Layout.js', 1, 'html-header');