jdevalk/wordpress-seo — pull request #1 by dimastelian (2012-12-04 09:34:38+00:00)
Title: small fixes to WPSEO_Admin::maybe_upgrade()

Hi, I've encountered a situation when Network activating the plugin on a multisite would throw "Cannot unset string offsets in /wp-content/plugins/wordpress-seo/admin/class-admin.php line 440".

I don't know if this is because a weird server configuration, but, in the snippet below, $options was a string, the isset would return true even if $options was not an array, and the unset line was throwing the error mentioned earlier.

```php
$options = get_option( 'wpseo' );
if ( isset( $options['presstrends'] ) ) {
...
unset( $options['presstrends'] );
}
```

I took the liberty to apply some is_array() checks to those lines, example:

```php
if ( is_array($options) and isset( $options['presstrends'] ) ) {
...
unset( $options['presstrends'] );
}
```