Skip to content

Loading…

DDC-1104: Require statement in AnnotationDriver.php can cause PHP Fatal error #1701

Closed
doctrinebot opened this Issue · 2 comments

2 participants

@doctrinebot

Jira issue originally created by user majkl578:

The require statement in Doctrine/ORM/Mapping/Driver/AnnotationDriver.php causes troubles in some cases. Imagine the situation when you're creating your own class loader which maps all classes and loads all requested classes lazily. When it loads any class from DoctrineAnnotations.php before loading AnnotationDriver and this class is loaded later, you get: PHP Fatal error: Cannot redeclare class ....

Changing require_ to _require_once solves the problem.

Pull request: #45

@doctrinebot

Comment created by @beberlei:

This was fixed for 2.1

@doctrinebot

Issue was closed with resolution "Fixed"

@beberlei beberlei was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.1 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.