Development

#3110 (Error in CRUD generation on windows)

You must first sign up to be able to contribute.

Ticket #3110 (closed defect: fixed)

Opened 9 months ago

Last modified 8 months ago

Error in CRUD generation on windows

Reported by: jphilip Assigned to: fabien
Priority: major Milestone: 1.0.14
Component: generator Version: 1.1.0 DEV
Keywords: CRUD genrator Cc:
Qualification: Unreviewed

Description

Using Windows 2003 and PHP 5.2.5 I get an error generating a CRUD with revision 7829

The error is on line 364 of sfFinder.class.php: (in() method)

$files = array_merge($files, str_replace($dir.DIRECTORY_SEPARATOR, , $this->search_in($dir)));

called by line 80 of sfGenerator.class.php:

$templateFile = $this->generatorManager->getConfiguration()->getGeneratorTemplate($this->getGeneratorClass(), $this->getTheme(), $templateFile);

The problem is that $dir already ends with a DIRECTORY_SEPARATOR, so the replacement does not happen and we end up with absolute an path. We may need to test if $dir ends with DIRECTORY_SEPARATOR before adding it in the in() method

Change History

04/04/08 10:16:09 changed by noel

  • status changed from new to closed.
  • resolution set to fixed.

(In [8254]) fixed #2958, #2416, #3110 : relative file search with sfFinder (closes #3110)

04/04/08 11:15:01 changed by noel

  • milestone set to 1.0.14.