cubecart / v6

CubeCart Version 6
https://cubecart.com
71 stars 59 forks source link

Undefined Variable #3541

Closed bhsmither closed 2 months ago

bhsmither commented 3 months ago

In admin, Manage Hooks, select a plugin. Click the Add Hook tab.

In settings.hooks.inc.php, near line 143, this is where code execution should be.

The code block in lines 145-154 is the only place where $hook_data gets defined. That $hook_data gets assigned to the template variable HOOK.

At line 170, $hook_data is used, but not yet defined. Suggest:

$selected = (isset($hook_data) && $hook_name==$hook_data['trigger']) ? ' selected="selected"' : '';

Then, in settings.hooks.php, line 189, this seems incomplete. There is a label for a form element(?).

Line 190 is appropriate to show which existing hook is currently being edited, but there is no drop-down selector to choose a trigger when adding a hook.

abrookbanks commented 2 months ago

Goodness. There was a lot of work to do there.