Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

small fixes to WPSEO_Admin::maybe_upgrade() #1

Closed
wants to merge 1 commit into from

Conversation

dimastelian
Copy link

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
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
jrfnl added a commit that referenced this pull request Nov 9, 2022
... for now.

I believe this may need to be fixed by changing the tests...

Relevant errors:
```
265) Yoast\WP\SEO\Tests\Unit\Generators\Schema\WebPage_Test::test_generate_with_provider with data set #0 (array(false), array(array('WebPage'), 'https://example.com/the-post/#webpage', 'https://example.com/the-post/', 'the-title', array('https://example.com/#website'), '2345-12-12 12:12:12', '2345-12-12 23:23:23', array('https://example.com/the-post/...dcrumb'), 'the-language', array(array('ReadAction', array('https://example.com/the-post/')))), 'There is no image, and breadc...abled.')
Creation of dynamic property Mockery_90_Yoast_WP_SEO_Helpers_Schema_ID_Helper::$webpage_hash is deprecated

/home/runner/work/wordpress-seo/wordpress-seo/tests/unit/generators/schema/webpage-test.php:118
/home/runner/work/wordpress-seo/wordpress-seo/vendor/yoast/phpunit-polyfills/src/TestCases/TestCasePHPUnitGte8.php:56

266) Yoast\WP\SEO\Tests\Unit\Generators\Schema\WebPage_Test::test_generate_with_provider with data set #1 (array(true), array(array('WebPage'), 'https://example.com/the-post/#webpage', 'https://example.com/the-post/', 'the-title', array('https://example.com/#website'), '2345-12-12 12:12:12', '2345-12-12 23:23:23', array('https://example.com/the-post/...dcrumb'), array('https://example.com/the-post/...yimage'), 'the-language', array(array('ReadAction', array('https://example.com/the-post/')))), 'There is an image, but breadc...abled.')
Creation of dynamic property Mockery_90_Yoast_WP_SEO_Helpers_Schema_ID_Helper::$webpage_hash is deprecated

/home/runner/work/wordpress-seo/wordpress-seo/tests/unit/generators/schema/webpage-test.php:118
/home/runner/work/wordpress-seo/wordpress-seo/vendor/yoast/phpunit-polyfills/src/TestCases/TestCasePHPUnitGte8.php:56
```
jrfnl added a commit that referenced this pull request Nov 10, 2022
... for now.

I believe this may need to be fixed by changing the tests...

Relevant errors:
```
265) Yoast\WP\SEO\Tests\Unit\Generators\Schema\WebPage_Test::test_generate_with_provider with data set #0 (array(false), array(array('WebPage'), 'https://example.com/the-post/#webpage', 'https://example.com/the-post/', 'the-title', array('https://example.com/#website'), '2345-12-12 12:12:12', '2345-12-12 23:23:23', array('https://example.com/the-post/...dcrumb'), 'the-language', array(array('ReadAction', array('https://example.com/the-post/')))), 'There is no image, and breadc...abled.')
Creation of dynamic property Mockery_90_Yoast_WP_SEO_Helpers_Schema_ID_Helper::$webpage_hash is deprecated

/home/runner/work/wordpress-seo/wordpress-seo/tests/unit/generators/schema/webpage-test.php:118
/home/runner/work/wordpress-seo/wordpress-seo/vendor/yoast/phpunit-polyfills/src/TestCases/TestCasePHPUnitGte8.php:56

266) Yoast\WP\SEO\Tests\Unit\Generators\Schema\WebPage_Test::test_generate_with_provider with data set #1 (array(true), array(array('WebPage'), 'https://example.com/the-post/#webpage', 'https://example.com/the-post/', 'the-title', array('https://example.com/#website'), '2345-12-12 12:12:12', '2345-12-12 23:23:23', array('https://example.com/the-post/...dcrumb'), array('https://example.com/the-post/...yimage'), 'the-language', array(array('ReadAction', array('https://example.com/the-post/')))), 'There is an image, but breadc...abled.')
Creation of dynamic property Mockery_90_Yoast_WP_SEO_Helpers_Schema_ID_Helper::$webpage_hash is deprecated

/home/runner/work/wordpress-seo/wordpress-seo/tests/unit/generators/schema/webpage-test.php:118
/home/runner/work/wordpress-seo/wordpress-seo/vendor/yoast/phpunit-polyfills/src/TestCases/TestCasePHPUnitGte8.php:56
```
hansjovis pushed a commit that referenced this pull request Nov 21, 2022
Migrate to Docusaurus v2
hansjovis pushed a commit that referenced this pull request Nov 21, 2022
Introduces a bunch of the documentation, ported and cut up in smaller sections
hansjovis pushed a commit that referenced this pull request Nov 21, 2022
vraja-pro pushed a commit that referenced this pull request Sep 20, 2023
Fix for resource_hints_plain_cleanup
@shabnam611 shabnam611 mentioned this pull request Jun 27, 2024
11 tasks
pls78 pushed a commit that referenced this pull request Sep 24, 2024
…n_shutdown

Include pluggable functions in shutdown callback
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