How to debug ‘Notice: Undefined index’ on a Request[‘action’]

A little bit of simple debugging and everything is clear.

$REQUEST['action'] is set in this case, so my first guess wasn’t true, but… Its value is ‘save’ and not ‘page’ nor ‘reset’. So your code does exactly nothing, because there is no if part for such value;