Doctrine 1
  1. Doctrine 1
  2. DC-286

Trailing DIRECTORY_SEPARATOR will cause Doctrine_Core::loadModels in PEAR mode to fail

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.2.0-RC1
    • Fix Version/s: 1.2.0
    • Component/s: None
    • Labels:
      None
    • Environment:

      Description

      If I'm using the PEAR model loading in Doctrine, and I try to create the tables from the models as follows.

      Doctrine::createTablesFromModels('/path/to/my/models/');

      Doctrine doesn't recognise the models and can't create any tables as a result.
      However if I remove the trailing slash.

      Doctrine::createTablesFromModels('/path/to/my/models');

      It works fine. This wasn't a problem is 1.2BETA-3. The problem is caused by changeset 6796, and the code that extracts the class name from the path of the filename not taking into account the trailing DIRECTORY_SEPARATOR.

        Activity

        Hide
        Pete Hatton added a comment -

        Patch for the issue.

        Show
        Pete Hatton added a comment - Patch for the issue.

          People

          • Assignee:
            Jonathan H. Wage
            Reporter:
            Pete Hatton
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: