diff --git a/lib.php b/lib.php index 8db1e4b..0fbaa5b 100644 --- a/lib.php +++ b/lib.php @@ -232,15 +232,16 @@ class kpcrypt { // Close the input file fclose($fin); - } else { - $this->errorLog[] = "[" . __LINE__ . "]" . "Could not open file output path for writing."; + $this->errorLog[] = "[" . __LINE__ . "]" . "Could not open file input path for writing."; return false; } - // Close the output file fclose($fout); return 1; + } else { + $this->errorLog[] = "[" . __LINE__ . "]" . "Could not open file output path for writing."; + return false; } }