warning: in_array() [function.in-array]: Wrong datatype for second argument in xmlsitemap.admin.inc on line 822.
warning: array_unshift() [function.array-unshift]: The first argument should be an array in xmlsitemap.admin.inc on line 823.

Comments

aexchecker’s picture

StatusFileSize
new545 bytes

It better

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Is something altering this form to unset($form['#submit'])? Because that is wrong. If anything a module should be setting $form['#submit'] = array();

aexchecker’s picture

If I'm not mistaken because I`m not a native speaker.
My fix mean to set $form['#submit'] = array(); if in $form array absent key #submit, and if $form['#submit'] isn`t array.

And.

This line !empty($form['#submit']) && is_array($form['#submit']) or $form['#submit'] = array(); we can rewrite in a different way like

if (empty($form['#submit']) || !is_array($form['#submit'])) {
  $form['#submit'] = array();
}

but I use the first variant because it is shorter.

Anonymous’s picture

But why isn't it set as an array already? It should be set before xmlsitemap see's it. In other words, there is another module that you have enabled that is doing the wrong thing.

dave reid’s picture

This is a bug in some other module causing $form['#submit'] to be unset instead of setting it to an empty array. That logic is very flawed and needs to be fixed in the offending module, not xmlsitemap.

dave reid’s picture

Category: bug » support
Status: Postponed (maintainer needs more info) » Fixed

Marking as fixed since it's not a problem with XML sitemap.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

altavis’s picture

Status: Closed (fixed) » Needs review

I can reproduce this bug on D6.19 (almost) clean install by turning off Menu module.

dave reid’s picture

Status: Needs review » Postponed (maintainer needs more info)

Can be reproduced by submitting what form at what URL? More details please.

altavis’s picture

StatusFileSize
new632 bytes

Hi Dave!

Clean multisite D6.19.

Steps:
- disable Menu module
- enable XML sitemap 6.x-2.0-beta1, XML sitemap custom, XML sitemap engines, XML sitemap node

Now any node adding/editing brings warnings (paths node/add/* node/*/edit).

jibbajabba’s picture

I get the same warning and can confirm that turning the menu module on (I had it off previously) removes the error message.

esllou’s picture

I confirm this problem exists...I also have menu module disabled. Will this fix be committed?

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

This has been already fixed in the most recent code, 6.x-2.x-dev, sorry I didn't come post back an update here sooner.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.