JMSSerializerBundle icon indicating copy to clipboard operation
JMSSerializerBundle copied to clipboard

Notice: Trying to get property 'name' of non-object in vendor/jms/serializer/src/JMS/Serializer/Metadata/PropertyMetadata.php line 58

Open Apostropher opened this issue 7 years ago • 2 comments

This occurs while trying to serialize an object into json.

Apostropher avatar Aug 14 '18 20:08 Apostropher

It looks the object is null but the serializer thinks is not.... can you share something more here?

goetas avatar Aug 15 '18 05:08 goetas

I think the most likely explanation here is a property annotated @Type("SomeType"), that should have been @Type("array<SomeType>").

I bug hunt this sort of issue by adding @Exclude to properties that I suspect, until I find the error by trial.

larxxor avatar Mar 01 '19 11:03 larxxor