PHP Fatal error: Uncaught Error: Call to undefined function create_function()

Reading Time: 2 minutes PHP Fatal error: Uncaught Error: Call to undefined function create_function() in /Users/napoleon/Sites/pfswp22/wp-content/themes/material/framework/widget-social-links.php:166 PHP Fatal error: Uncaught Error: Call to undefined function create_function() in /Users/napoleon/Sites/pfswp22/wp-content/themes/material/framework/widget-social-links.php:166 Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website. Root cause of the problem: create_function() is depriciated… Continue reading PHP Fatal error: Uncaught Error: Call to undefined function create_function()

PHP Fatal error: Uncaught Error: Using $this when not in object context in file.php

Reading Time: < 1 minute As per php documentation, Because static methods are callable without an instance of the object created, the pseudo-variable $this is not available inside methods declared as static. https://www.php.net/manual/en/language.oop5.static.php In the above code snippet, static method getValue() will throw the error this is the same use case. Things to be noted in Static Method and Static Variable: Static… Continue reading PHP Fatal error: Uncaught Error: Using $this when not in object context in file.php