The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
In Wordpress 5.8.2 and Pods 2.8.8.1: When I try to add or edit a regular non-Pods WordPress post, I'm seeing the dread "Critical error has occurred on this website", and the error in /var/log/apache2/error.log reads:
[Mon Dec 20 15:45:17.997719 2021] [proxy_fcgi:error] [pid 27:tid 139983084041984] [client 172.18.0.6:53704] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, string given in /var/www/html/cms-service/wp-includes/rest-api/class-wp-rest-server.php:1436
I logged out the $key and $opts, and sure enough, it's failing when the $key is "pod_code" and the $opts is the name of one of my pods. A string, not an array.
I'm on deadline, so I just patched it like this and moved on with my day:
Description
In Wordpress 5.8.2 and Pods 2.8.8.1: When I try to add or edit a regular non-Pods WordPress post, I'm seeing the dread "Critical error has occurred on this website", and the error in /var/log/apache2/error.log reads:
[Mon Dec 20 15:45:17.997719 2021] [proxy_fcgi:error] [pid 27:tid 139983084041984] [client 172.18.0.6:53704] AH01071: Got error 'PHP message: PHP Fatal error: Uncaught TypeError: array_intersect_key(): Argument #1 ($array) must be of type array, string given in /var/www/html/cms-service/wp-includes/rest-api/class-wp-rest-server.php:1436
When I go there I see this code:
I logged out the $key and $opts, and sure enough, it's failing when the $key is "pod_code" and the $opts is the name of one of my pods. A string, not an array.
I'm on deadline, so I just patched it like this and moved on with my day:
I can edit, add and delete regular non-pod posts.
Version
2.8.8.1
Testing Instructions
No response
Screenshots / Screencast
No response
Possible Workaround
Convert the $opts to an array in the for-loop circa line 1436 in /var/www/html/cms-service/wp-includes/rest-api/class-wp-rest-server.php.
Change this:
To this:
Site Health Information
Pods Package