DDC-373: Improper use of ternary operator in EntityManager::create() #462

Open
opened 2026-01-22 12:39:06 +01:00 by admin · 0 comments
Owner

Originally created by @doctrinebot on GitHub (Feb 25, 2010).

Jira issue originally created by user susokary:

It seems to me that you make an improper use of ternary operator in EntityManager::create() since revision #6226.
In last revision available, you can see, line #605 of lib/Doctrine/ORM/EntityManager.php, this instruction : $config = $config ?: new Configuration();
Instead of, I guess, this one : $config = $config ? $config : new Configuration();
What do you think ?

Originally created by @doctrinebot on GitHub (Feb 25, 2010). Jira issue originally created by user susokary: It seems to me that you make an improper use of ternary operator in EntityManager::create() since revision #6226. In last revision available, you can see, line #605 of lib/Doctrine/ORM/EntityManager.php, this instruction : $config = $config ?: new Configuration(); Instead of, I guess, this one : $config = $config ? $config : new Configuration(); What do you think ?
admin added the Bug label 2026-01-22 12:39:06 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#462