Looks like they may have changed the isset() behavior in PHP 5.2.3. Until then, if a variable was set to NULL, isset() returned false, but now it returns true.
PS: If you want to return TRUE if $button is set to an empty string or zero, use the "!==" (not identical) operator:
if(isset($button) && $button !== NULL) {
PPS: If you want it to return false if the variable is not set, or if it is set to NULL, FALSE, zero, or an empty string, then use:
if(!empty($button)) {