• Resolved abhishekgoyal

    (@abhishekgoyal)


    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.

Viewing 1 replies (of 1 total)
  • Plugin Author digitalpoint

    (@digitalpoint)

    I wasn’t able to replicate it on my end, however there really isn’t a reason those particular actions need to absolutely run last. Given that, I went ahead and lowered the priority number and stopped using PHP_INT_MAX (it’s still something high, just not *that* high).

    This has already been rolled out in the new version (1.8.2).

Viewing 1 replies (of 1 total)
  • The topic ‘PHP_INT_MAX prevents hooks from being triggered’ is closed to new replies.