Resolved

Reported for: WPML String Translation 2.6.0

Resolved in: 2.6.1

Symptoms

If you visit the WPML -> Theme and plugins localization page, you might encounter PHP warnings if debugging is enabled in your WordPress installation.

The warnings refer to ../wpml-string-translation/inc/wpml-string-translation.class.php on line 813.

This issue will be resolved in next release of WPML String Translation plugin.

Workaround

As a workaround, you can change the following code segment, found in the ../wpml-string-translation/inc/wpml-string-translation.class.php file, around the line 813.

		$widget_text = get_option('widget_text');
		if(is_array($widget_text)){
			foreach($widget_text as $k=>$w){
				if(!empty($w) && isset($w['title']) && in_array($k, $active_text_widgets)){
					icl_register_string('Widgets', 'widget body - ' . md5($w['text']), $w['text']);
				}
			}
		}

Change it to the following code:

		$widget_text = get_option( 'widget_text' );
		if ( is_array( $widget_text ) ) {
			foreach ( $widget_text as $k => $w ) {
				if ( ! empty( $w ) && isset( $w['title'], $w['text'] ) && in_array( $k, $active_text_widgets ) && $w['text'] ) {
					icl_register_string( 'Widgets', 'widget body - ' . md5( $w['text'] ), $w['text'] );
				}
			}
		}