DDC-1470: Bad discrimator value give imprecise error exception #1845

Closed
opened 2026-01-22 13:28:15 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Nov 4, 2011).

Jira issue originally created by user fmaz008:

When you define a wrong discriminator field in the mapping configuration, doctrine will return the following ErrorException when trying to get an instance of the object:

ErrorException: Notice: Undefined index:  in /Users/fmaz/Site/vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php line 92

This is not precise enough, an error giving hint on the mapping configuration that is concerned, and on the bad field should be given.

Hope this will help improving the "userfriendlyness"

Originally created by @doctrinebot on GitHub (Nov 4, 2011). Jira issue originally created by user fmaz008: When you define a wrong discriminator field in the mapping configuration, doctrine will return the following ErrorException when trying to get an instance of the object: ``` ErrorException: Notice: Undefined index: in /Users/fmaz/Site/vendor/doctrine/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php line 92 ``` This is not precise enough, an error giving hint on the mapping configuration that is concerned, and on the bad field should be given. Hope this will help improving the "userfriendlyness"
admin added the Improvement label 2026-01-22 13:28:15 +01:00
admin closed this issue 2026-01-22 13:28:15 +01:00
Author
Owner

@doctrinebot commented on GitHub (Mar 16, 2012):

Comment created by @guilhermeblanco:

Fixed in 6f3ef148a9

@doctrinebot commented on GitHub (Mar 16, 2012): Comment created by @guilhermeblanco: Fixed in https://github.com/doctrine/doctrine2/commit/6f3ef148a95c6e598f9b16848c6a33b3d7a39077
Author
Owner

@doctrinebot commented on GitHub (Mar 16, 2012):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Mar 16, 2012): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1845