Fix crashes in ConvertMappingCommand and GenerateEntitiesCommand when using entities with joined table inheritance
Fix crashes in ConvertMappingCommand and GenerateEntitiesCommand when using entities with joined table inheritance

ConvertMappingCommand and GenerateEntitiesCommand both use the DisconnectedClassMetadataFactory, which allows metadata manipulation without loading the associated classes. Commit a36bea broke these two commands by adding a bailout condition in ClassMetadataFactory::populateDiscriminatorValue which checks $metadata->reflClass->isAbstract(). If the DisconnectedClassMetadataFactory is being used, $metadata->reflClass will always be null, causing a fatal error, "Fatal error: Call to a member function isAbstract() on null".

This commit adds a check to see if $metadata->reflClass is set before checking isAbstract.

Ocramius/doctrine2,BenMorel/doctrine2,meeuw/doctrine2,deviantintegral/doctrine2,hallabro/doctrine2,tiger-seo/doctrine2,bocharsky-bw/doctrine2,Sitetheory/doctrine2,giosh94mhz/doctrine2,nicoschoenmaker/doctrine2,Tobion/doctrine2,janlanger/doctrine2,tiger-seo/doctrine2,giosh94mhz/doctrine2,sustmi/doctrine2,cyberid41/doctrine2,DHager/doctrine2,jaimz22/doctrine2,tomaszmadeyski/doctrine2,mikeSimonson/doctrine2,sergeyz/doctrine2,steevanb/doctrine2-fix-persistent-collection-clear,Hikariii/doctrine2,damour/doctrine2,mente/doctrine2,holtkamp/doctrine2,aivus/doctrine2,beanworks/doctrine2,qu1m/doctrine2,bocharsky-bw/doctrine2,verschoof/doctrine2,tomaszmadeyski/doctrine2,PowerKiKi/doctrine2,deeky666/doctrine2,Ocramius/doctrine2,sergeyz/doctrine2,beanworks/doctrine2,qu1m/doctrine2,renan/doctrine2,BlueM/doctrine2,Amrit01/doctrine2,satomif/doctrine2,hallabro/doctrine2,gnat42/doctrine2,janlanger/doctrine2,emiel-silverstreet/doctrine2,vershnik/doctrine2,meeuw/doctrine2,nicolas-grekas/doctrine2,lcobucci/doctrine2,fabiocarneiro/doctrine2,nicoschoenmaker/doctrine2,issei-m/doctrine2,BenMorel/doctrine2,dag-io/doctrine2,issei-m/doctrine2,kinncj/doctrine2,fabiocarneiro/doctrine2,cyberid41/doctrine2,Luwdo/doctrine2,dag-io/doctrine2,TomasVotruba/doctrine2,Majkl578/doctrine2,emiel-silverstreet/doctrine2,AdactiveSAS/doctrine2,hellomedia/doctrine2,holtkamp/doctrine2,nicovogelaar/doctrine2,rezonant/doctrine2,easybiblabs/doctrine2,Tobion/doctrine2,verschoof/doctrine2,gencer/doctrine2,brabeji/doctrine2,mihai-stancu/doctrine2,c960657/doctrine2,Amrit01/doctrine2,SocialbitGmbH/doctrine2,mikeSimonson/doctrine2,Tony133/doctrine2,tPl0ch/doctrine2,deviantintegral/doctrine2,satomif/doctrine2,Luwdo/doctrine2,localheinz/doctrine2,xhuberty/doctrine2,cybermo/doc-tr-ine,levelfivehub/doctrine2,gencer/doctrine2,stof/doctrine2,SocialbitGmbH/doctrine2,Ocramius/doctrine2,Tony133/doctrine2,zeroedin-bill/doctrine2,yurybykov/doctrine2,bigfoot90/doctrine2,doctrine/doctrine2,Hikariii/doctrine2,shieldo/doctrine2,nayluge/doctrine2,DethCount/doctrine2,easybiblabs/doctrine2,guiwoda/doctrine2,steevanb/doctrine2-fix-persistent-collection-clear,DethCount/doctrine2,jaimz22/doctrine2,stof/doctrine2,fprochazka/doctrine2,cybermo/doc-tr-ine,BlueM/doctrine2,ehimen/doctrine2,aivus/doctrine2,AdactiveSAS/doctrine2,TomasVotruba/doctrine2,levelfivehub/doctrine2,mente/doctrine2,mihai-stancu/doctrine2,nicolas-grekas/doctrine2,ehimen/doctrine2,bigfoot90/doctrine2,yurybykov/doctrine2,localheinz/doctrine2,vershnik/doctrine2,kinncj/doctrine2,deeky666/doctrine2,damour/doctrine2,zeroedin-bill/doctrine2,nayluge/doctrine2,doctrine/doctrine2,Sitetheory/doctrine2,fprochazka/doctrine2,lcobucci/doctrine2,guiwoda/doctrine2,brabeji/doctrine2,xhuberty/doctrine2,sustmi/doctrine2,hellomedia/doctrine2,Majkl578/doctrine2,PowerKiKi/doctrine2,renan/doctrine2,DHager/doctrine2,deguif/doctrine2,rezonant/doctrine2,deguif/doctrine2,nicovogelaar/doctrine2,tPl0ch/doctrine2,gnat42/doctrine2,c960657/doctrine2,shieldo/doctrine2