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

WP Super Cache causing "Uncaught TypeError" #37438

Open
rob-kne opened this issue May 17, 2024 · 3 comments
Open

WP Super Cache causing "Uncaught TypeError" #37438

rob-kne opened this issue May 17, 2024 · 3 comments
Labels
[Plugin] Super Cache A fast caching plugin for WordPress. [Pri] Normal Triaged [Type] Bug When a feature is broken and / or not performing as intended

Comments

@rob-kne
Copy link

rob-kne commented May 17, 2024

Impacted plugin

Super Cache

Quick summary

Wordpress gives out error message because of WP Super Cache plugin, more info see below.

Steps to reproduce

For some days now I daily get an error message from Wordpress saying my website has a "technical error".

In the error details it says the following (in German due to my localization):

WordPress-Version 6.5.3
Aktives Theme: OceanWP (Version 3.5.5)
Aktuelles Plugin: WP Super Cache (Version 1.12.1)
PHP-Version 8.2.18

Fehler-Details

Ein Fehler vom Typ E_ERROR wurde in der Zeile 2937 der Datei /srv/www/htdocs/mydomainname/wp-content/plugins/wp-super-cache/wp-cache.php verursacht. Fehlermeldung: Uncaught TypeError: array_unshift(): Argument #1 ($array) must be of type array, null given in /srv/www/htdocs/mydomainname/wp-content/plugins/wp-super-cache/wp-cache.php:2937
Stack trace:
#0 /srv/www/htdocs/mydomainname/wp-content/plugins/wp-super-cache/wp-cache.php(2937): array_unshift()
#1 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(326): wp_cache_plugin_actions()
#2 /srv/www/htdocs/mydomainname/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#3 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php(377): apply_filters()
#4 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Sync\Modules\Callables->set_plugin_action_links()
#5 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#6 /srv/www/htdocs/mydomainname/wp-includes/plugin.php(517): WP_Hook->do_action()
#7 /srv/www/htdocs/mydomainname/wp-admin/includes/class-wp-screen.php(424): do_action()
#8 /srv/www/htdocs/mydomainname/wp-admin/includes/screen.php(243): WP_Screen->set_current_screen()
#9 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php(527): set_current_screen()
#10 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php(629): Automattic\Jetpack\Sync\Sender->get_items_to_send()
#11 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php(484): Automattic\Jetpack\Sync\Sender->do_sync_for_queue()
#12 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php(359): Automattic\Jetpack\Sync\Sender->do_sync_and_set_delays()
#13 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php(739): Automattic\Jetpack\Sync\Sender->do_sync()
#14 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php(679): Automattic\Jetpack\Sync\Actions::do_cron_sync_by_type()
#15 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Sync\Actions::do_cron_sync()
#16 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#17 /srv/www/htdocs/mydomainname/wp-includes/plugin.php(565): WP_Hook->do_action()
#18 /srv/www/htdocs/mydomainname/wp-cron.php(191): do_action_ref_array()
#19 {main}
thrown


Do you have any idea how to get rid of this error?
Many thanks in advance.

A clear and concise description of what you expected to happen.

No response

What actually happened

No response

Impact

All

Available workarounds?

There is no user impact

Platform (Simple and/or Atomic)

Self-hosted

Logs or notes

For some days now I daily get an error message from Wordpress saying my website has a "technical error".

In the error details it says the following (in German due to my localization):

WordPress-Version 6.5.3
Aktives Theme: OceanWP (Version 3.5.5)
Aktuelles Plugin: WP Super Cache (Version 1.12.1)
PHP-Version 8.2.18

Fehler-Details

Ein Fehler vom Typ E_ERROR wurde in der Zeile 2937 der Datei /srv/www/htdocs/mydomainname/wp-content/plugins/wp-super-cache/wp-cache.php verursacht. Fehlermeldung: Uncaught TypeError: array_unshift(): Argument #1 ($array) must be of type array, null given in /srv/www/htdocs/mydomainname/wp-content/plugins/wp-super-cache/wp-cache.php:2937
Stack trace:
#0 /srv/www/htdocs/mydomainname/wp-content/plugins/wp-super-cache/wp-cache.php(2937): array_unshift()
#1 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(326): wp_cache_plugin_actions()
#2 /srv/www/htdocs/mydomainname/wp-includes/plugin.php(205): WP_Hook->apply_filters()
#3 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/modules/class-callables.php(377): apply_filters()
#4 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Sync\Modules\Callables->set_plugin_action_links()
#5 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#6 /srv/www/htdocs/mydomainname/wp-includes/plugin.php(517): WP_Hook->do_action()
#7 /srv/www/htdocs/mydomainname/wp-admin/includes/class-wp-screen.php(424): do_action()
#8 /srv/www/htdocs/mydomainname/wp-admin/includes/screen.php(243): WP_Screen->set_current_screen()
#9 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php(527): set_current_screen()
#10 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php(629): Automattic\Jetpack\Sync\Sender->get_items_to_send()
#11 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php(484): Automattic\Jetpack\Sync\Sender->do_sync_for_queue()
#12 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-sender.php(359): Automattic\Jetpack\Sync\Sender->do_sync_and_set_delays()
#13 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php(739): Automattic\Jetpack\Sync\Sender->do_sync()
#14 /srv/www/htdocs/mydomainname/wp-content/plugins/jetpack/jetpack_vendor/automattic/jetpack-sync/src/class-actions.php(679): Automattic\Jetpack\Sync\Actions::do_cron_sync_by_type()
#15 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(324): Automattic\Jetpack\Sync\Actions::do_cron_sync()
#16 /srv/www/htdocs/mydomainname/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#17 /srv/www/htdocs/mydomainname/wp-includes/plugin.php(565): WP_Hook->do_action()
#18 /srv/www/htdocs/mydomainname/wp-cron.php(191): do_action_ref_array()
#19 {main}
thrown


Do you have any idea how to get rid of this error?
Many thanks in advance.

@rob-kne rob-kne added [Type] Bug When a feature is broken and / or not performing as intended Needs triage Ticket needs to be triaged labels May 17, 2024
@github-actions github-actions bot added [Plugin] Super Cache A fast caching plugin for WordPress. [Pri] Normal labels May 17, 2024
@fgiannar
Copy link
Contributor

@rob-kne Many thanks for the report! Could you please provide the version of the Jetpack plugin you are using or try updating Jetpack to the latest version and confirm you are still getting this error?

@fgiannar fgiannar added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label May 21, 2024
@mrfoxtalbot mrfoxtalbot added Triaged and removed Needs triage Ticket needs to be triaged labels May 21, 2024
@rob-kne
Copy link
Author

rob-kne commented May 21, 2024

I am using the current version 13.4.3 of the Jetpack plugin,

@fgiannar fgiannar removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label May 22, 2024
@fgiannar
Copy link
Contributor

Adding a note here that I've audited the Sync related part, where we apply the plugin_action_links filter and we ensure that the corresponding $actions argument is an array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Plugin] Super Cache A fast caching plugin for WordPress. [Pri] Normal Triaged [Type] Bug When a feature is broken and / or not performing as intended
Projects
Development

No branches or pull requests

3 participants