Modify ↓
Ticket #205 (closed defect: fixed)
AvailableTask::_checkResource ends up with an exception if resource isn't found.
| Reported by: | anonymous | Owned by: | hans |
|---|---|---|---|
| Priority: | minor | Milestone: | 2.3.1 |
| Component: | phing-tasks-system | Version: | 2.3.0 |
| Keywords: | Cc: |
Description
Sorry no test.
<available resource="(unavailable resource)" ..
will generate an exception in the PhingFile constructor.
Index: classes/phing/tasks/system/AvailableTask.php
===================================================================
--- classes/phing/tasks/system/AvailableTask.php (revision 332)
+++ classes/phing/tasks/system/AvailableTask.php (working copy)
@@ -126,7 +126,11 @@
}
function _checkResource($resource) {
- return $this->_checkFile1(new PhingFile(Phing::getResourcePath($resource)));
+ if ($resourcePath = Phing::getResourcePath($resource)) {
+ return $this->_checkFile1(new PhingFile($resourcePath));
+ } else {
+ return false;
+ }
}
}
Attachments
Change History
comment:3 Changed 4 years ago by hans
- Status changed from assigned to closed
- Resolution set to fixed
Patch applied in changeset:333
Note: See
TracTickets for help on using
tickets.
