Viewing 2 replies - 1 through 2 (of 2 total)
  • I also conducted PHP7 compatibility tests on our WordPress pages and the following messages are relevant for your project:

    $ vendor/bin/php7cc --no-interaction --except=cache --except=wp-admin --except=wp-includes . .
    
    File: wp-content/plugins/redirection/models/match.php
    > Line 6: PHP 4 constructors are now deprecated
        function Red_Match($values = '')
        {
        }
    
    File: wp-content/plugins/redirection/models/action.php
    > Line 5: PHP 4 constructors are now deprecated
        function Red_Action($values)
        {
        }
    
    File: wp-content/plugins/redirection/models/redirect.php
    > Line 21: PHP 4 constructors are now deprecated
        function Red_Item($values, $type = '', $match = '')
        {
        }
    
    File: wp-content/plugins/redirection/models/log.php
    > Line 12: PHP 4 constructors are now deprecated
        function RE_Log($values)
        {
        }
    > Line 148: PHP 4 constructors are now deprecated
        function RE_404($values)
        {
        }

    What these messages mean: You need to specify the constructor as function __construct(). If you want you can still obtain PHP4 compatibility by keeping the PHP4-style constructors like:

    function RE_LOG($values) {
       $this->__construct($values);
    }
    function __construct( $values ) {
    	foreach ( $values AS $key => $value ) {
    		$this->$key = $value;
    	}
    
    	$this->created = mysql2date( 'U', $this->created );
    	$this->url = stripslashes( $this->url );
    }

    Hey y’all. See this issue from Nov 20th. There is a PR for it that is just waiting to be merged.

    Please chime in there so we can hopefully get this fixed sooner.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘php 7 – RE_Log has a deprecated constructor’ is closed to new replies.