Check whether bzdecompress is available
authorTim Düsterhus <timwolla@arcor.de>
Fri, 18 May 2012 15:24:59 +0000 (17:24 +0200)
committerTim Düsterhus <timwolla@arcor.de>
Fri, 18 May 2012 15:24:59 +0000 (17:24 +0200)
wcfsetup/install/files/lib/system/io/Zip.class.php

index b6f2f2204865d2bfaba7b04b9f38424ed0fe791b..348cc518ee99479cdb5e9f37fa2780bb7b2ea9cd 100644 (file)
@@ -307,7 +307,8 @@ class Zip extends File implements IArchive {
                                $content = gzinflate($content);
                        break;
                        case 12:
-                               $content = bzdecompress($content);
+                               if (function_exists('bzdecompress')) $content = bzdecompress($content);
+                               else throw new SystemException('The bzip2 extension is not available');
                        case 0:
                        break;
                        default: