OSDN Git Service

[fix]変数名の誤りを訂正
[hengband/web.git] / score / dump_file.inc
index e0a85f8..526009d 100644 (file)
@@ -34,7 +34,7 @@ class DumpFile
         header("Etag: ".$etag);
         header("Content-Type: ".$content_type);
 
-        if ($content_encoding !== FALSE) {
+        if ($content_encoding !== NULL) {
             header("Content-Encoding: ".$content_encoding);
             echo $contents;
         } else {
@@ -45,7 +45,7 @@ class DumpFile
 
     public function save($dir, $ext, $contents)
     {
-        if ($outputs === FALSE) return;
+        if ($contents === FALSE) return;
 
         umask(2); // Group書き込み権限許可
 
@@ -124,8 +124,7 @@ class DumpFile
             self::browser_accept_encodings(),
             ['gzip', 'x-gzip']);
 
-        return count($supported_gzip_encodings) > 0 ?
-            $supported_gzip_encodings[0] : FALSE;
+        return array_shift($supported_gzip_encodings);
     }
 
 }