Skip to content

Commit

Permalink
Fixed PHP Fatal error. Implemented ArrayAccess methods to allow array…
Browse files Browse the repository at this point in the history
… operator access to class properties. fixes NagiosEnterprises#20
  • Loading branch information
CodyCodeman committed Jan 9, 2018
1 parent f72410e commit 16adf8e
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion www/api/application/libraries/factory/NagiosObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,23 @@ public function get_type(){
return $this->_type;
}

public function offsetExists ($offset)
{
return isset($this->$offset);
}

public function offsetGet ($offset)
{
return $this->$offset;
}

}
public function offsetSet ($offset, $value)
{
$this->$offset = $value;
}

public function offsetUnset ($offset)
{
unset($this->$offset);
}
}

0 comments on commit 16adf8e

Please sign in to comment.