Skip to content

Commit

Permalink
ticket:118 - Added fix from domain51.com for NULL projects in Unknown…
Browse files Browse the repository at this point in the history
…Element
  • Loading branch information
hozn committed Jul 29, 2007
1 parent 31efe14 commit 27c55e8
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions classes/phing/UnknownElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,19 @@ function handleChildren(ProjectComponent $parent, $parentWrapper) {
$realChild = $this->makeTask($child, $childWrapper, false);
$parent->addTask($realChild);
} else {
$realChild = $ih->createElement($this->project, $parent, $child->getTag());
$project = $this->project === null ? $parent->project : $this->project;
$realChild = $ih->createElement($project, $parent, $child->getTag());
}

$childWrapper->setProxy($realChild);
if ($realChild instanceof Task) {
$realChild->setRuntimeConfigurableWrapper($childWrapper);
}

$child->handleChildren($realChild, $childWrapper);

if ($realChild instanceof ProjectComponent) {
$child->handleChildren($realChild, $childWrapper);
}

if ($realChild instanceof Task) {
$realChild->maybeConfigure();
}
Expand Down

0 comments on commit 27c55e8

Please sign in to comment.