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
If any of the users don't have a profile photo, I get the following error: TypeError Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string, null given, called in [...]/vendor/craftcms/cms/src/helpers/Db.php on line 448
I'd expect to be able to just handle a missing photo in my template code after the query executes.
Steps to reproduce
Create an entry
Add a Users field to the entry and select a user that does not have a photo
Query for that entry, and eager load the user and their photo
Additional info
Craft version: 3.0.1
PHP version: 7.1.12
Database driver & version: MySQL 5.6.38
Plugins & versions: CodeMirror 1.0.0, Element API 2.5.2, GatherContent 1.0.5, Redactor 1.1.0
With a little more experimentation, it seems like user photos might be a special field, not treated like a normal Asset field. So perhaps my assumption that I could eager load the image asset is incorrect.
Description
I'm executing a nested eager load: querying for a list of entries, eager loading the user from a specific field, and also that user's profile photo.
If any of the users don't have a profile photo, I get the following error:
TypeError Argument 1 passed to craft\helpers\StringHelper::toLowerCase() must be of the type string, null given, called in [...]/vendor/craftcms/cms/src/helpers/Db.php on line 448
I'd expect to be able to just handle a missing photo in my template code after the query executes.
Steps to reproduce
Additional info
Stack Trace
The text was updated successfully, but these errors were encountered: