If I'm running the potx coder review on a module that does not implement hook_menu, I get the following PHP notice error:
notice: Undefined index: statistics_advanced_menu in /home/davereid/Projects/drupal6/sites/all/modules/contrib/potx/potx.inc on line 894.

function _potx_find_menu_hook($file, $filebase, $save_callback) {
  global $_potx_tokens, $_potx_lookup;
  
  if (is_array($_potx_lookup[$filebase .'_menu'])) {

Needs to be changed to:

function _potx_find_menu_hook($file, $filebase, $save_callback) {
  global $_potx_tokens, $_potx_lookup;
  
  if (isset($_potx_lookup[$filebase .'_menu']) && is_array($_potx_lookup[$filebase .'_menu'])) {

and it fixes all the notice errors!

Comments

gábor hojtsy’s picture

Status: Active » Reviewed & tested by the community

Yes, looks like a great fix.

gábor hojtsy’s picture

Version: 6.x-2.x-dev » 5.x-2.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed this fix, thanks! Also target for 5.x-2.x backport, if that ever happens. Not high on priority.

gábor hojtsy’s picture

Version: 5.x-2.x-dev » 6.x-2.x-dev
Status: Patch (to be ported) » Fixed

Since 5.x is not maintained, moving back to fixed.

Status: Fixed » Closed (fixed)

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