Modify

Ticket #24 (closed defect: fixed)

Opened 6 years ago

Last modified 6 years ago

Cannot import class file located in a directory named that includes dot

Reported by: anonymous Owned by: mrook
Priority: major Milestone: 2.2.0
Component: Version: 2.2.0RC1
Keywords: Cc:

Description

Cannot import class file located in a directory named that includes dot(such as "Foo-x.y.z\FooTask.php").

I propose a solution to fix it.

Phing::import() {
  :
  $path = strtr($dotPath, '.', DIRECTORY_SEPARATOR) . ".php";
  :
}

to

Phing::import() {
  :
  $dotClassname = basename($dotPath);
  $dotClassnamePos = strlen($dotPath) - strlen($dotClassname);
  $classFile = strtr($dotClassname, '.', DIRECTORY_SEPARATOR) . ".php";
  $path = substr_replace($dotPath, $classFile, $dotClassnamePos);
  :
}

Attachments

Change History

comment:1 Changed 6 years ago by mrook

  • Owner set to mrook
  • Status changed from new to assigned

This is a problem, your patch looks okay, thanks!

comment:2 Changed 6 years ago by mrook

  • Status changed from assigned to closed
  • Resolution set to fixed

Patch applied, issue fixed in r51.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.