test for existence of DiskSpace in array

pull/2158/head
Isaac Connor 2018-07-12 14:05:43 -04:00
parent e05604e4b3
commit 95e4341d28
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ class Event {
if ( is_null($new) or ( $new != '' ) ) {
$this->{'DiskSpace'} = $new;
}
if ( null === $this->{'DiskSpace'} ) {
if ( (!array_key_exists('DiskSpace',$this)) or (null === $this->{'DiskSpace'}) ) {
$this->{'DiskSpace'} = folder_size($this->Path());
dbQuery('UPDATE Events SET DiskSpace=? WHERE Id=?', array($this->{'DiskSpace'}, $this->{'Id'}));
}