Ticket #224 (closed defect: fixed)

Opened 3 months ago

Last modified 3 months ago

Path class duplicates absolute path on subsequent path includes

Reported by: benjamin.stover@gmail.com Assigned to: hans
Priority: minor Milestone: 2.3.1
Component: phing-core Version: 2.3.0
Keywords: classpath Cc:

Description

I found this bug when I was set the classpath parameter for a PHPUnit node like this:

<phpunit3 codecoverage="false" printsummary="true" failureproperty="testfail" haltonfailure="true" >
  <batchtest classpath="includes:includes/classes">
    .....
  </batchtest>
</phpunit3>

It was not finding a file and the include path was a strange value, like: include_path='/absolute/path/includes:/absolute/path/absolute/path/includes/classes'. After some investigation, I found the culprit was translatePath in Path.php. A patch that fixes the issue is included--it also fixes a problem where, if one of the directories cannot be added, then a bad value would still get included in the list.

This issue affects 2.3 and trunk.

Attachments

TranslatePathFix.diff (1.2 kB) - added by benjamin.stover@gmail.com on 02/21/08 22:58:43.
Can be applied by running patch -p0 < TranslatePathFix.diff

Change History

02/21/08 22:58:43 changed by benjamin.stover@gmail.com

  • attachment TranslatePathFix.diff added.

Can be applied by running patch -p0 < TranslatePathFix.diff

02/26/08 09:16:31 changed by mrook

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

Patch applied in r359, thanks!


Add/Change #224 (Path class duplicates absolute path on subsequent path includes)




Action