Skip to content

Commit

Permalink
Disallow phingcall's from the project root
Browse files Browse the repository at this point in the history
  • Loading branch information
mrook committed Oct 7, 2016
1 parent 4c1e442 commit 9fe16c4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/phing/tasks/system/PhingCallTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ public function init()
*/
public function main()
{
if ($this->getOwningTarget()->getName() === "") {
$this->log("Cowardly refusing to call target '{$this->subTarget}' from the root", Project::MSG_WARN);
return;
}

$this->log("Running PhingCallTask for target '" . $this->subTarget . "'", Project::MSG_DEBUG);
if ($this->callee === null) {
Expand Down

0 comments on commit 9fe16c4

Please sign in to comment.