Skip to content

Commit

Permalink
Added check to make sure Sitemap config options are setup correctly w…
Browse files Browse the repository at this point in the history
…hen a plugin saves an item

Partial fix for issue #1068
  • Loading branch information
eSilverStrike committed Jun 8, 2020
1 parent 4e43b3b commit 914071b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/xmlsitemap/functions.inc
Expand Up @@ -425,6 +425,12 @@ function plugin_itemsaved_xmlsitemap($id, $type, $old_id, $sub_type)
$result = false;

if (!empty($id) && !empty($type)) {

// Make sure type is setup in the arrays else bail
if (!isset($_XMLSMAP_CONF[$type]) || !isset($_XMLSMAP_CONF['priorities'][$type]) || !isset($_XMLSMAP_CONF['frequencies'][$type])) {
return;
}

require_once __DIR__ . '/xmlsitemap.class.php';

$sitemap = new XMLSitemap(COM_getCharset());
Expand Down

0 comments on commit 914071b

Please sign in to comment.