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
publicfunction getUserTemporaryUploadFolder(User$user = null)
{
if ($user === null) {
// Default to the logged-in user, if there is one$user = Craft::$app->getUser()->getIdentity();
}
if (isset($this->_userTempFolders[$user->id])) { # <-- issue happens herereturn$this->_userTempFolders[$user->id];
}
The getIdentity method can return null, hence the warning about reading the id property.
Although I marked this as a Craft 3 bug, it looks like it might affect 4.x as well.
Craft CMS version
3.7.50
PHP version
8.1
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered:
Hi Brandon, it looks like this issue is still happening when there is no logged-in user. There are two additional attempts to access $user->id later on in the method:
What happened?
Description
Our error monitoring logs are showing thousands of the following ErrorException message:
Per the stack trace, this is happening when the getUserTemporaryUploadFolder method is called.
The
getIdentity
method can return null, hence the warning about reading theid
property.Although I marked this as a Craft 3 bug, it looks like it might affect 4.x as well.
Craft CMS version
3.7.50
PHP version
8.1
Operating system and version
No response
Database type and version
No response
Image driver and version
No response
Installed plugins and versions
The text was updated successfully, but these errors were encountered: