Removed workaround for PHP 5.1.2
authorAlexander Ebert <ebert@woltlab.com>
Fri, 2 Mar 2012 15:14:30 +0000 (16:14 +0100)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 2 Mar 2012 15:14:30 +0000 (16:14 +0100)
Fixes #476

wcfsetup/install/files/lib/util/FileUtil.class.php

index eb27e610d3cf8e013c941fdb93d9077a85433542..b3ec1b0357dc278a9dc44a4b632199c61f951e24 100644 (file)
@@ -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/';