Ticket #24 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

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

Reported by: anonymous Assigned to: 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

04/12/06 15:18:39 changed by mrook

  • owner set to mrook.
  • status changed from new to assigned.

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

04/12/06 15:25:06 changed by mrook

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

Patch applied, issue fixed in r51.


Add/Change #24 (Cannot import class file located in a directory named that includes dot)




Action