Bad Gateway 502 on WordPress Login
-
Somehow the
purge_post_on_updateis called on the login page?! and because$post_type_object = get_post_type_object($post_type);is null, the following condition errors out:`Somehow thepurge_post_on_updateis called on the login page?! and because$post_type_object = get_post_type_object($post_type);is null, the following condition errors out:if ((defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || 'revision' === $post_type || !$post_type_object->public) { return; }2023/01/17 13:41:18 [error] 746#746: *689 FastCGI sent in stderr: "PHP message: PHP Warning: Attempt to read property "public" on null in /home/vsp/xxxx.com/dist-wp/wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php on line 146PHP message: PHP Warning: Attempt to read property "public" on null in /home/vsp/xxxx.com/dist-wp/wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php on line 146PHP message: PHP Warning: Attempt to read property "public" on null in /home/vsp/xxxx.com/dist-wp/wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php on line 146PHP message: PHP Warning: Attempt to read property "public" on null in /home/vsp/xxxx.com/dist-wp/wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php on line 146PHP message: PHP Warning: Attempt to read property "public" on null in /home/vsp/xxxx.com/dist-wp/wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php on line 146PHP message: PHP Warning: Attempt to read property "public" on null in /home/vsp/xxxx.com/dist-wp/wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php on line 146PHP message: PHP Warning: Attempt to read property "public" on null in /home/vsp/xxxx.com/dist-wp/wp-content/plugins/wp-optimize/cache/class-wpo-cache-rules.php on line 146" while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: xxxx.com, request: "GET /wp-login.php?redirect_to=https%3A%2F%2Fxxxx.com%2Fwp-admin%2F&reauth=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm-vsp.sock:", host: "xxxx.com" 2023/01/17 13:41:18 [error] 746#746: *689 upstream sent too big header while reading response header from upstream, client: xxx.xxx.xxx.xxx, server: xxxx.com, request: "GET /wp-login.php?redirect_to=https%3A%2F%2Fxxxx.com%2Fwp-admin%2F&reauth=1 HTTP/1.1", upstream: "fastcgi://unix:/run/php/php8.1-fpm-vsp.sock:", host: "xxxx.com"The soution is to check for null in the same if
if ((defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) || 'revision' === $post_type || $post_type_object == null || !$post_type_object->public) { return; }
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Bad Gateway 502 on WordPress Login’ is closed to new replies.