Permalink
Browse files

Fixes #928 - check if zip extension is activated

  • Loading branch information...
1 parent 1199f27 commit 8aae4c8e7596da4195e7cf3b788658d21cd4bc90 @mrook mrook committed Oct 13, 2012
Showing with 6 additions and 2 deletions.
  1. +6 −2 classes/phing/tasks/ext/ZipTask.php
@@ -110,8 +110,12 @@ public function setIncludeEmptyDirs($bool) {
* do the work
* @throws BuildException
*/
- public function main() {
-
+ public function main()
+ {
+ if (!extension_loaded('zip')) {
+ throw new BuildException("Zip extension is required");
+ }
+
if ($this->zipFile === null) {
throw new BuildException("zipfile attribute must be set!", $this->getLocation());
}

0 comments on commit 8aae4c8

Please sign in to comment.