Modify

Ticket #224 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Path class duplicates absolute path on subsequent path includes

Reported by: benjamin.stover@… Owned by: 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 Download (1.2 KB) - added by benjamin.stover@… 4 years ago.
Can be applied by running patch -p0 < TranslatePathFix.diff

Change History

Changed 4 years ago by benjamin.stover@…

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

comment:1 Changed 4 years ago by mrook

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

Patch applied in r359, thanks!

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.