Add file_exist check back, a=chris

Chris Pollett [2021-09-12 06:Sep:th]
Add file_exist check back, a=chris
Filename
src/library/PackedTableTools.php
diff --git a/src/library/PackedTableTools.php b/src/library/PackedTableTools.php
index 3c2ab3c13..7d8bee449 100644
--- a/src/library/PackedTableTools.php
+++ b/src/library/PackedTableTools.php
@@ -300,9 +300,10 @@ class PackedTableTools
      */
     public function load($table_path, $mode = self::REPLACE_MODE)
     {
-        if(($pre_table = file_get_contents($table_path)) == false) {
+        if (!file_exists($table_path)) {
             return null;
         }
+        $pre_table = file_get_contents($table_path);
         $table = $this->compressor->uncompress($pre_table);
         $rows = [];
         $fixed_length_key = ($this->key_len > 0);
ViewGit