Prevent PHP warnings due to trying to fetch unset array entries

This commit is contained in:
Antoine Le Gonidec 2024-10-04 20:36:02 +02:00
parent cb61358939
commit adc1f27528
Signed by: vv221
GPG key ID: 636B78F91CEB80D8

View file

@ -35,6 +35,11 @@ class action_plugin_tagalerts extends DokuWiki_Action_Plugin{
if(is_null($tags)) true;
foreach($event->data['meta'] as &$meta) {
// FIXME: Skip entries where the "name" key is not set,
// this might be a symptom of some bug.
if ( ! array_key_exists('name', $meta) ) continue;
if($meta['name'] == 'keywords') {
// Get an array of page's tags
$this->pagetags = explode(',', $meta['content']);