Reputation: 23
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 );
Upvotes: 1
Views: 1111
Reputation: 19308
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.
Upvotes: 3