Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to a member function getName() on null in Zend Developer Tools #464

Closed
SebastienGautier opened this issue Apr 25, 2016 · 2 comments
Closed
Labels
Question Further information is requested

Comments

@SebastienGautier
Copy link

image

I managed to fix this by adding a simple not null check line 152 of the MetadataGrapher.php file :

    /**
     * @param ClassMetadata $class1
     * @param ClassMetadata $class2
     * @return string|null
     */
    private function getClassReverseAssociationName(ClassMetadata $class1, ClassMetadata $class2)
    {
        foreach ($class2->getAssociationNames() as $class2Side) {
            $targetClass = $this->getClassByName($class2->getAssociationTargetClass($class2Side));
            if ($class1 !== null && $targetClass !== null && $class1->getName() === $targetClass->getName()) {
                return $class2Side;
            }
        }

        return null;
    }

I'm using ZDT 1.0.0-RC1, DoctrineModule 1.0.1 and DoctrineORMModule 0.10.0 but I tried and few other versions and still had the issue.

@SebastienGautier SebastienGautier changed the title Call to a member function getName() on null in Zend Developper Toolbar Call to a member function getName() on null in Zend Developer Tools Apr 25, 2016
@TomHAnderson
Copy link
Member

@Groseb any change to this issue?

@TomHAnderson TomHAnderson added the Question Further information is requested label Jun 5, 2017
@SebastienGautier
Copy link
Author

I haven't been using Zend Framework in a while now, I can't say

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants