[ad_1]
Hi,
When connect to the admin we got this error :
Fatal error: Uncaught TypeError: array_merge(): Argument #1 must be of type array, null given in /www/<private>/html/wp-content/plugins/seo-by-rank-math/includes/modules/content-ai/class-event-scheduler.php:96This error seems to be cause by CloudFlare. This request in the class-event-scheduler.php :
$data = wp_remote_get( 'https://rankmath.com/wp-json/contentai/v1/defaultPrompts' );Return this :
Error 1015
Ray ID: 802da03bfda692bd • 2023-09-07 08:36:46 UTC
You are being rate limited
What happened?
The owner of this website (rankmath.com) has banned you temporarily from accessing this website.
Was this page helpful? Yes No
Thank you for your feedback!
Cloudflare Ray ID: 802da03bfda692bd • Your IP: Click to reveal 139.X.X.X • Performance & security by CloudflareAnd at line 96 you try to merge json_decode($data). But json_decode($data) is not an array.
update_option( 'rank_math_content_ai_prompts', array_merge( json_decode( $data, true ), $custom_prompts ) );After disable Content AI Module problem disapear.
You should maybe decode then test if result is a array before merge.
A temporary solution is to :
- In file /www/<private>/html/wp-content/plugins/seo-by-rank-math/includes/modules/content-ai/class-event-scheduler.php:96 comment the line :
update_option( ‘rank_math_content_ai_prompts’, array_merge( json_decode( $data, true ), $custom_prompts ) ); - Disable Content AI Module
- Uncomment the line
- Then wait the plugin update 🙂
Bests,
Sébastien.
- This topic was modified 3 hours, 52 minutes ago by .
- This topic was modified 3 hours, 44 minutes ago by .
