Fixed warnings in validate methods of MenuBlock.php