MDL-38154 do not hardcode sha1 hash of empty string
authorPetr Škoda <commits@skodak.org>
Mon, 25 Feb 2013 09:10:57 +0000 (10:10 +0100)
committerPetr Škoda <commits@skodak.org>
Mon, 25 Feb 2013 09:10:57 +0000 (10:10 +0100)
lib/filestorage/file_storage.php

index de4d0c2..09d636a 100644 (file)
@@ -1635,7 +1635,7 @@ class file_storage {
     public function deleted_file_cleanup($contenthash) {
         global $DB;
 
-        if ($contenthash === 'da39a3ee5e6b4b0d3255bfef95601890afd80709') {
+        if ($contenthash === sha1('')) {
             // No need to delete empty content file with sha1('') content hash.
             return;
         }