Closed (fixed)
Project:
Translation template extractor
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2008 at 21:15 UTC
Updated:
7 Sep 2009 at 13:10 UTC
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
Comment #1
gábor hojtsyYes, looks like a great fix.
Comment #2
gábor hojtsyCommitted this fix, thanks! Also target for 5.x-2.x backport, if that ever happens. Not high on priority.
Comment #3
gábor hojtsySince 5.x is not maintained, moving back to fixed.