Skip to content

small fixes to WPSEO_Admin::maybe_upgrade()#1

Closed
dimastelian wants to merge 1 commit intoYoast:masterfrom
dimastelian:master
Closed

small fixes to WPSEO_Admin::maybe_upgrade()#1
dimastelian wants to merge 1 commit intoYoast:masterfrom
dimastelian:master

Conversation

@dimastelian
Copy link
Copy Markdown

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.

$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:

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

@ghost ghost assigned echoLP May 14, 2013
@jdevalk
Copy link
Copy Markdown
Contributor

jdevalk commented May 29, 2013

This was fixed recently, so no need to merge this pull.

@jdevalk jdevalk closed this May 29, 2013
barrykooij added a commit that referenced this pull request Jan 29, 2014
Fixes #3
Fixes #1
@Amon001 Amon001 mentioned this pull request Jul 15, 2014
seripap pushed a commit to seripap/wordpress-seo that referenced this pull request Nov 19, 2015
Initial commit added preprocessor for preparing text for page analysis
moorscode pushed a commit that referenced this pull request Feb 19, 2016
Applied all feedback from CR 1
@Rahe Rahe mentioned this pull request Apr 22, 2016
@tbadal tbadal mentioned this pull request May 18, 2016
moorscode added a commit that referenced this pull request Aug 29, 2016
Extended endpoint with type and arguments to be better implementable for different systems
afercia pushed a commit that referenced this pull request Sep 5, 2016
Extended endpoint with type and arguments to be better implementable for different systems
@shabnam611 shabnam611 mentioned this pull request Jun 27, 2024
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants