From: Alexander Ebert Date: Fri, 2 Mar 2012 15:14:30 +0000 (+0100) Subject: Removed workaround for PHP 5.1.2 X-Git-Tag: 2.0.0_Beta_1~1274 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=60ff4a415362c9631ada04f5a380204161cb805c;p=GitHub%2FWoltLab%2FWCF.git Removed workaround for PHP 5.1.2 Fixes #476 --- diff --git a/wcfsetup/install/files/lib/util/FileUtil.class.php b/wcfsetup/install/files/lib/util/FileUtil.class.php index eb27e610d3..b3ec1b0357 100644 --- a/wcfsetup/install/files/lib/util/FileUtil.class.php +++ b/wcfsetup/install/files/lib/util/FileUtil.class.php @@ -54,17 +54,14 @@ class FileUtil { return $_ENV['TMPDIR'] . '/'; } - // workaround for a bug in php 5.1.2 that returns true for is_writable('/tmp/') with safe_mode = on - if (!preg_match('/^5\.1\.2(?![.0-9])/', phpversion())) { - if (($path = ini_get('upload_tmp_dir')) && @is_writable($path)) { - return $path . '/'; - } - if (@file_exists('/tmp/') && @is_writable('/tmp/')) { - return '/tmp/'; - } - if (function_exists('session_save_path') && ($path = session_save_path()) && @is_writable($path)) { - return $path . '/'; - } + if (($path = ini_get('upload_tmp_dir')) && @is_writable($path)) { + return $path . '/'; + } + if (@file_exists('/tmp/') && @is_writable('/tmp/')) { + return '/tmp/'; + } + if (function_exists('session_save_path') && ($path = session_save_path()) && @is_writable($path)) { + return $path . '/'; } $path = WCF_DIR.'tmp/';