[PR #63] [MERGED] Added missing checks for associatation indexes #7663

Closed
opened 2026-01-22 15:56:14 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/63
Author: @chesteroni
Created: 5/29/2011
Status: Merged
Merged: 6/5/2011
Merged by: @beberlei

Base: masterHead: master


📝 Commits (1)

  • 23540c1 Added checking for existing indexes in associatation mapping array.

📊 Changes

1 file changed (+20 additions, -12 deletions)

View changed files

📝 lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php (+20 -12)

📄 Description

I cam to that problem while running doctrine:mapping:import with 'php' mapping type.
I got in my database (MySQL) three tables (simplified):
categories(id), messages(id) and categories_messages(categories_id,messages_id).

Doctrine threw an exception while importing mappings in php, although in xml it was OK.
The message was:
[ErrorException]
Notice: Undefined index: orderBy in /var/project/vendor/doctrine/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php line 136

And there were no checks of the existence of indexes in an array so I added those checks and if they return true, copying a value takes place as previous.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/63 **Author:** [@chesteroni](https://github.com/chesteroni) **Created:** 5/29/2011 **Status:** ✅ Merged **Merged:** 6/5/2011 **Merged by:** [@beberlei](https://github.com/beberlei) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (1) - [`23540c1`](https://github.com/doctrine/orm/commit/23540c17f182143f391ef6c1a4d495a81bb26a67) Added checking for existing indexes in associatation mapping array. ### 📊 Changes **1 file changed** (+20 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php` (+20 -12) </details> ### 📄 Description I cam to that problem while running doctrine:mapping:import with 'php' mapping type. I got in my database (MySQL) three tables (simplified): categories(`id`), messages(`id`) and categories_messages(`categories_id`,`messages_id`). Doctrine threw an exception while importing mappings in php, although in xml it was OK. The message was: [ErrorException] Notice: Undefined index: orderBy in /var/project/vendor/doctrine/lib/Doctrine/ORM/Tools/Export/Driver/PhpExporter.php line 136 And there were no checks of the existence of indexes in an array so I added those checks and if they return true, copying a value takes place as previous. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:56:14 +01:00
admin closed this issue 2026-01-22 15:56:14 +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#7663