After pulling my hair out for hours of debugging, i found out that getOptionsFromConfig() is not working as intended.
protected function getOptionsFromConfig(Config $config)
{
$options = [];
if ($visibility = $config->get('visibility')) {
$options['predefinedAcl'] = $this->getPredefinedAclForVisibility($visibility);
} else {
// if a file is created without an acl, it isn't accessible via the console
// we therefore default to private
$options['predefinedAcl'] = $this->getPredefinedAclForVisibility(AdapterInterface::VISIBILITY_PRIVATE);
}
if ($metadata = $config->get('metadata')) {
$options['metadata'] = $metadata;
}
return $options;
}
Specifically in this part of the function
if ($visibility = $config->get('visibility')) {
$options['predefinedAcl'] = $this->getPredefinedAclForVisibility($visibility);
}
This happens because $config->get('whatever') apparently always return NULL whether the settings key has been set or not, and therefore always equal to false in the if else condition.
After pulling my hair out for hours of debugging, i found out that getOptionsFromConfig() is not working as intended.
Specifically in this part of the function
This happens because $config->get('whatever') apparently always return NULL whether the settings key has been set or not, and therefore always equal to false in the if else condition.
Anybody know how to fix this??