From: Tim Düsterhus Date: Fri, 18 May 2012 15:24:59 +0000 (+0200) Subject: Check whether bzdecompress is available X-Git-Tag: 2.0.0_Beta_1~1098^2^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=25132d82f23bb2469bf0370a82f37091aaa13426;p=GitHub%2FWoltLab%2FWCF.git Check whether bzdecompress is available --- diff --git a/wcfsetup/install/files/lib/system/io/Zip.class.php b/wcfsetup/install/files/lib/system/io/Zip.class.php index b6f2f22048..348cc518ee 100644 --- a/wcfsetup/install/files/lib/system/io/Zip.class.php +++ b/wcfsetup/install/files/lib/system/io/Zip.class.php @@ -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: