dsa45132 2017-05-02 09:05
浏览 24
已采纳

我该如何解决这个问题?

I am getting this notice on wordpress

constant PHP_INT_MIN - assumed 'PHP_INT_MIN' in /home/myusername/public_html/wordpress/wp-content/plugins/wpsso/lib/com/util.php on line 488.

How do I resolve this?

add_filter( $filter_name, array( __CLASS__, 'filter_value_save' ), PHP_INT_MIN, 1 );
        add_filter( $filter_name, array( __CLASS__, 'filter_value_restore' ), PHP_INT_MAX, 1 );

        return true;
    }

    public static function remove_filter_protection( $filter_name ) {
        if ( ! has_filter( $filter_name, array( __CLASS__, 'filter_value_restore' ) ) ) {
            return false;
        }
        remove_filter( $filter_name, array( __CLASS__, 'filter_value_save' ), PHP_INT_MIN );
        remove_filter( $filter_name, array( __CLASS__, 'filter_value_restore' ), PHP_INT_MAX );
  • 写回答

1条回答 默认 最新

  • douwuying4709 2017-05-02 10:53
    关注

    PHP_INT_MIN is a predefined constant in PHP that has been available since PHP7.

    PHP_INT_MAX on the other hand has existed since an early version of PHP5.

    You're running the site on a server that's using an older version of PHP (pre-7) and therefore don't have access to the PHP_INT_MIN constant. The notice is telling you that the constant doesn't exist so it's being converted into a string instead.

    http://php.net/manual/en/reserved.constants.php

    As this issue is occurring in a third-party plugin, you shouldn't be modifying the code yourself. You have a few options including contacting your host about updating your PHP version; notifying the plugin author of the issue and hoping they release a fix; or manually defining the constant yourself in an appropriate location.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 2024-五一综合模拟赛
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭