You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The error is: Unable to write file at location: uploads/driver-b54302ec-c772-11ea-b66f-06f3f99250a0/faces/1407502025021167ab59b6c8da0.png. Trying to access array offset on null.
but it happens when I try to read or update a file too, the error is thrown in the line 98 of google/auth/src/CacheTrait.php, $key = $this->cacheConfig['prefix'] . $key;
it happens because the value lifetime and prefix aren't being set on the credentials files, like google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php or google/auth/src/Credentials/GCECredentials.php, so the attribute cacheConfig is null on the CacheTrait.php, causing the exception, if I set them manually, it works fine.
the full function is
/**
* @param null|string $key
* @return null|string
*/
private function getFullCacheKey($key)
{
if (is_null($key)) {
return null;
}
$key = $this->cacheConfig['prefix'] . $key;
// ensure we do not have illegal characters
$key = preg_replace('|[^a-zA-Z0-9_\.!]|', '', $key);
// Hash keys if they exceed $maxKeyLength (defaults to 64)
if ($this->maxKeyLength && strlen($key) > $this->maxKeyLength) {
$key = substr(hash('sha256', $key), 0, $this->maxKeyLength);
}
return $key;
}
I would say that a possible solution is setting a default value right into the CacheTrait.php attribute, something like this:
private $cacheConfig = [
'lifetime' => 1500,
'prefix' => '',
];
The text was updated successfully, but these errors were encountered:
The error is: Unable to write file at location: uploads/driver-b54302ec-c772-11ea-b66f-06f3f99250a0/faces/1407502025021167ab59b6c8da0.png. Trying to access array offset on null.
but it happens when I try to read or update a file too, the error is thrown in the line 98 of google/auth/src/CacheTrait.php, $key = $this->cacheConfig['prefix'] . $key;
it happens because the value lifetime and prefix aren't being set on the credentials files, like google/auth/src/Credentials/ImpersonatedServiceAccountCredentials.php or google/auth/src/Credentials/GCECredentials.php, so the attribute cacheConfig is null on the CacheTrait.php, causing the exception, if I set them manually, it works fine.
the full function is
/**
* @param null|string $key
* @return null|string
*/
private function getFullCacheKey($key)
{
if (is_null($key)) {
return null;
}
I would say that a possible solution is setting a default value right into the CacheTrait.php attribute, something like this:
private $cacheConfig = [
'lifetime' => 1500,
'prefix' => '',
];
The text was updated successfully, but these errors were encountered: