tessus / mwExtensionMantis

MediaWiki Extension:Mantis
https://www.mediawiki.org/wiki/Extension:Mantis
GNU General Public License v2.0
2 stars 6 forks source link

Notice when using "comment" feature #32

Closed pedwik closed 6 years ago

pedwik commented 6 years ago

When adding a custom comment for a specific bug, like this:

status = resolved, closed fixed_in_version = 2.9.0 show = id,category, summary, fixed_in_version, updated, resolution orderby = category, summary comment.150 = Extra info bugg 150

I get this warning: Notice: Use of undefined constant id - assumed 'id' in C:\Wiki\mw1291\extensions\Mantis\Mantis.php on line 1013

The code is if (array_key_exists($row[id], $conf['comment'])) { $output .= $conf['comment'][$row[id]]."\n"; }

Replacing id with 'id' solves the problem for me.

tessus commented 6 years ago

Thanks for the report.

I thought I had enclosed all keys in quotes. Will fix this later today.

tessus commented 6 years ago

Please note that this is only a notice and does not change the behaviour of the code.

The code still works.

tessus commented 6 years ago

fixed in https://github.com/tessus/mwExtensionMantis/commit/faff3a181c26d7c39023e6480052b0f8cd9fdafb