PHP_INT_MAX prevents hooks from being triggered

Hi,
I am using this plugin on almost all of my websites. Last day I tried setting up a new website on a new server. I noticed it was not auto purging the cache. I tried tracing the bug and I found

add_action('transition_post_status', array($this, 'purgeCacheOnPostStatusChange'), PHP_INT_MAX, 3);

this and other similar hooks were not getting triggered.

PHP_INT_MAX is what causing the issue here. When I tried with a smaller number, they started getting triggered. Even PHP_INT_MAX - 1 is working.

I am not fully sure if this problem is in wordpress core, your plugin or in my PHP/server settings. But I thought sharing it here might help someone.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer