There's a *tiny* bug in the xmlsitemap_drush_command() function - it adds items to the variable $items without first defining it.

CommentFileSizeAuthor
#1 xmlsitemap-n634730.patch650 bytesdamienmckenna

Comments

damienmckenna’s picture

Status: Active » Needs review
StatusFileSize
new650 bytes

Quick patch.

dave reid’s picture

That's odd. I thought this worked like hook_menu() where we start using $items without doing $items = array().

damienmckenna’s picture

I thought it was standard PHP syntax that would throw an E_NOTICE if the variable didn't exist first?

dave reid’s picture

It's never done that for me, and I'm using error reporting with notices always during development. :/ Can you confirm it causes a notice?

damienmckenna’s picture

Status: Needs review » Closed (fixed)

Sorry, my mistake, I thought I remembered PHP needed arrays to be defined first.

dave reid’s picture

No worries. You would think it would, but it doesn't care. A minor PHPWTF.