Fix PHP Warning when "contributor" is NULL
This commit is contained in:
parent
66f74305f7
commit
0c13153d8e
1 changed files with 10 additions and 8 deletions
18
action.php
18
action.php
|
@ -99,14 +99,16 @@ class action_plugin_semantic extends DokuWiki_Action_Plugin {
|
||||||
'email' => $user_data['mail']
|
'email' => $user_data['mail']
|
||||||
);
|
);
|
||||||
|
|
||||||
foreach ($meta['contributor'] as $uid => $fullname) {
|
if (isset($meta['contributor'])) {
|
||||||
$contributor_data = $auth->getUserData($uid);
|
foreach ($meta['contributor'] as $uid => $fullname) {
|
||||||
$json_ld['contributor'][] = array(
|
$contributor_data = $auth->getUserData($uid);
|
||||||
'@context' => 'http://schema.org',
|
$json_ld['contributor'][] = array(
|
||||||
'@type' => 'Person',
|
'@context' => 'http://schema.org',
|
||||||
'name' => $fullname,
|
'@type' => 'Person',
|
||||||
'email' => $contributor_data['mail']
|
'name' => $fullname,
|
||||||
);
|
'email' => $contributor_data['mail']
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue