Empty $integrations array prevents defining $links

Empty $integrations array prevents defining $links which causes a notice for undefined var and warning in `implode()`
This commit is contained in:
entr 2013-01-16 17:46:40 +02:00
parent 44013d4480
commit 039dfbd94b
1 changed files with 3 additions and 1 deletions

View File

@ -395,7 +395,9 @@ if ( ! function_exists( 'woocommerce_settings' ) ) {
$integrations = $woocommerce->integrations->get_integrations();
$current_section = empty( $current_section ) ? key( $integrations ) : $current_section;
$links = array();
foreach ( $integrations as $integration ) {
$title = empty( $integration->method_title ) ? ucwords( $integration->id ) : ucwords( $integration->method_title );