New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue with PHP 8.1 #37
Comments
Hi,
Unfortunately no. The good news is that PHP Deprecated: is a warning and not an error. The theme will still function with PHP 8.1.3. The following links have more information regarding this deprecation. https://www.php.net/manual/en/migration80.deprecated.php Kind regards. |
Thanks. I've "fixed" it for now, by deleting the optional parameter in the function call
from the variable $depth. That has stopped the warnings filling up the log and the site still seems to work OK. Roger |
Do you mean to say you rem // the function? Or did you actually delete the function altogether from the code? Kind regards, |
I duplicated the function line, then changed the argument for the $depth variable in the second active line and commented out the first original line, so the whole section of suffusion-walkers.php is now // Roger - next line modified to remove warnings about $depth From a suggestion i found on StackExchange that it would probably work OK without the " = 0" after $depth Roger (Sorry - don't know why the block of code isn't displaying correctly) |
Yes, that is correct. I also read in one of the StackExchange support the same information; remove the "= 0" would do the trick. Which is also mentioned in the following link https://www.php.net/manual/en/migration80.deprecated.php. Although in this link it refers to removing the "= null". If your code is good why don't you submit a Pull request? In actual fact there are 2 more deprecations in Suffusion. Here are the other 2. Deprecated: Required parameter $current_comment follows optional parameter $custom_options in F:\xampp8.0.19\htdocs\tipstrickses\wp-content\themes\suffusion\functions\filters.php on line 48 Deprecated: Required parameter $current_post follows optional parameter $custom_options in F:\xampp8.0.19\htdocs\tipstrickses\wp-content\themes\suffusion\functions\filters.php on line 48 I have created my own updated version 4.5.8, which has a few fixes including the following pull request. Kind regards. |
I've got a site running WordPress 6.1 and Suffusion 4.5.7 on PHP 8.1.3. I'm seeing these errors in the error_log file
PHP Deprecated: Optional parameter $depth declared before required parameter $output is implicitly treated as a required parameter in /home/xxxxx/xxxxxx/wp/wp-content/themes/suffusion/library/suffusion-walkers.php on line 27
Has anyone developed a fix for this?
Thanks
Roger
The text was updated successfully, but these errors were encountered: