Change record status: 
Introduced in branch: 
main
Introduced in version: 
main
Description: 

no need to have a switch(){} for single case, use if, please

Before

          switch ($block->getPluginId()) {

            // Remove these blocks from Program page if Adv Profiles .
            case 'save_programs_user_list':
              if ($subtype == 0 || empty($user_data)) {
                $event->stopPropagation();
              }
              break;
          }
        }

After

if ($block->getPluginId() == 'save_programs_user_list' && ($subtype == 0 || empty($user_data)) {
  $event->stopPropagation();
}
Impacts: 
Module developers

Comments

podarok’s picture