Deprecated message in PHP 7
-
My hosting has upgraded PHP to 7, and I’ve been getting a lot of the following message in my logs:
Methods with the same name as their class will not be constructors in a future version of PHP; Widget_SU has a deprecated constructor in /var/www/vhosts/hikari-images.co.uk/drewk.photo/gallery/wp-content/plugins/custom-post-template/plugin.php on line 507
Changing the line :
function Widget_SU ($name, $max = 1, $id = '', $args = '')
to
__construct ($name, $max = 1, $id = '', $args = '')
seems to sort the problem
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Deprecated message in PHP 7’ is closed to new replies.