Skip to content

Commit

Permalink
Fix storing non-entered metric values
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-WWU-IT committed Mar 26, 2021
1 parent 9631650 commit b0b51cf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions controller/settingscontroller.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,16 @@ public function saveSettings($apikey, $sitename, $siteurl, $country, $iopurl, $n
{
$siteid = null;

if ($numusers == null) {
$numusers = 0;
}
if ($numfiles == null) {
$numfiles = 0;
}
if ($numstorage == null) {
$numstorage = 0;
}

// submit settings to Mentix (if they are valid)
if ($apikey !== "" && $sitename !== "" && $siteurl !== "" && $iopurl !== "") {
try {
Expand Down

0 comments on commit b0b51cf

Please sign in to comment.