aboutsummaryrefslogtreecommitdiffstats
path: root/php
diff options
context:
space:
mode:
authoradam <adam@>2021-02-13 22:35:07 +0200
committeradam <adam@>2021-02-13 22:35:07 +0200
commitdddaa125c047f3b0401dec885b3d65ce21d7c483 (patch)
treebe98a790b113611cbc7a0a944e9d629763ba7016 /php
parent5c4f408cada9b60ab1b65335879378c43cfdca21 (diff)
downloadfileup-dddaa125c047f3b0401dec885b3d65ce21d7c483.tar.gz
fix
Diffstat (limited to 'php')
-rw-r--r--php/database.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/php/database.php b/php/database.php
index 42ff7c1..c8904db 100644
--- a/php/database.php
+++ b/php/database.php
@@ -107,7 +107,13 @@ require_once "node.php";
return NULL;
}
$ret= $statement->fetch(PDO::FETCH_ASSOC);
- return $ret["id"];
+ if(isset($ret["id"]))
+ {
+ return $ret["id"];
+ }else
+ {
+ return NULL;
+ }
}
/* I think this only makes sense if node is a dir*/
/* returns assoc array of nodes*/
@@ -348,7 +354,7 @@ require_once "node.php";
/*give premissions*/
$id=$this->get_node_with_code($code_name);
- if($id!=NULL)
+ if($id==NULL)
{
error_log("created a dangling directory but couldn't find it afterward. Fatal error!");
exit(1);