Ticket #205 (closed defect: fixed)

Opened 6 months ago

Last modified 6 months ago

AvailableTask::_checkResource ends up with an exception if resource isn't found.

Reported by: anonymous Assigned to: 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

12/28/07 21:25:46 changed by hans

  • status changed from new to assigned.

12/28/07 21:30:10 changed by hans

(In [333]) Refs #205 - Applying patch for AvailableTask checking resources.

12/28/07 21:30:42 changed by hans

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

Patch applied in changeset:333


Add/Change #205 (AvailableTask::_checkResource ends up with an exception if resource isn't found.)




Action