Prevent PHP warnings due to trying to fetch unset array entries
This commit is contained in:
parent
198c0ba490
commit
58e4580c81
1 changed files with 4 additions and 2 deletions
|
@ -131,7 +131,8 @@ class helper_plugin_semantic extends DokuWiki_Plugin
|
|||
*/
|
||||
public function getAuthor()
|
||||
{
|
||||
return ($this->meta['creator'] ? $this->meta['creator'] : null);
|
||||
return ( array_key_exists('creator', $this->meta ) ?
|
||||
$this->meta['creator'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -141,7 +142,8 @@ class helper_plugin_semantic extends DokuWiki_Plugin
|
|||
*/
|
||||
public function getAuthorID()
|
||||
{
|
||||
return ($this->meta['user'] ? $this->meta['user'] : null);
|
||||
return ( array_key_exists('user', $this->meta ) ?
|
||||
$this->meta['user'] : null;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue