Skip to content

Instantly share code, notes, and snippets.

@doctrinebot
Created December 13, 2015 18:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save doctrinebot/a7e685bcdb14ef1ce066 to your computer and use it in GitHub Desktop.
Save doctrinebot/a7e685bcdb14ef1ce066 to your computer and use it in GitHub Desktop.
Attachments to Doctrine Jira Issue DDC-1732 - https://github.com/doctrine/doctrine2/issues/2381
Index: lib/Doctrine/ORM/Proxy/ProxyFactory.php
===================================================================
--- lib/Doctrine/ORM/Proxy/ProxyFactory.php (revision 6670)
+++ lib/Doctrine/ORM/Proxy/ProxyFactory.php (working copy)
@@ -358,7 +358,11 @@
/** @private */
public function __load()
{
- if (!$this->__isInitialized__ && $this->_entityPersister) {
+ if (!$this->__isInitialized__) {
+ if (!$this->_entityPersister) {
+ throw new \Doctrine\ORM\ORMException("Uninitialized detached proxy");
+ }
+
$this->__isInitialized__ = true;
if (method_exists($this, "__wakeup")) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment