Closed maechler closed 5 years ago
The variable $cacheControl is initialised with null: https://github.com/MaxServ/t3ext-fal_s3/blob/fe076675088f2ab0ed4bae80e44474a22eb1ca92/Classes/CacheControl/RemoteObjectUpdater.php#L110
$cacheControl
null
But it will always be changed to a string after one of the following methods has been called, because implode(',', []) returns an empty string instead of null. https://github.com/MaxServ/t3ext-fal_s3/blob/fe076675088f2ab0ed4bae80e44474a22eb1ca92/Classes/CacheControl/RemoteObjectUpdater.php#L138-L145
implode(',', [])
Thus the following condition is not working to check whether metadata should be updated or not. https://github.com/MaxServ/t3ext-fal_s3/blob/fe076675088f2ab0ed4bae80e44474a22eb1ca92/Classes/CacheControl/RemoteObjectUpdater.php#L147-L151
I changed the condition to !empty($cacheControl), which detects null as well as empty strings.
!empty($cacheControl)
The variable
$cacheControl
is initialised withnull
: https://github.com/MaxServ/t3ext-fal_s3/blob/fe076675088f2ab0ed4bae80e44474a22eb1ca92/Classes/CacheControl/RemoteObjectUpdater.php#L110But it will always be changed to a string after one of the following methods has been called, because
implode(',', [])
returns an empty string instead ofnull
. https://github.com/MaxServ/t3ext-fal_s3/blob/fe076675088f2ab0ed4bae80e44474a22eb1ca92/Classes/CacheControl/RemoteObjectUpdater.php#L138-L145Thus the following condition is not working to check whether metadata should be updated or not. https://github.com/MaxServ/t3ext-fal_s3/blob/fe076675088f2ab0ed4bae80e44474a22eb1ca92/Classes/CacheControl/RemoteObjectUpdater.php#L147-L151
I changed the condition to
!empty($cacheControl)
, which detectsnull
as well as empty strings.