Skip to content
This repository was archived by the owner on Mar 30, 2024. It is now read-only.

Commit 25083cd

Browse files
committed
Fix API Add
1 parent a303ac5 commit 25083cd

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
latest
2-
0.2.0
2+
0.2.1
33
0.2
44
0

php/core/api/APIAdd.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ protected function handleAPITask() : void{
4242
}
4343
else{
4444
$this->error('Error saving data.');
45-
}
45+
}
4646
}
4747
else{
48-
if( unlink( $filename) ){
48+
if( !is_file( $filename ) || unlink( $filename ) ){
4949
$this->output = array( 'ok' );
5050
}
5151
else{

0 commit comments

Comments
 (0)