PHP 已弃用的错误

PHP Deprecated errors

[22-Apr-2018 17:36:22 Europe/London] PHP Deprecated:  Methods with the same name as their class will not be constructors in a future version of PHP; plgK2FbComments_K2 has a deprecated constructor in `/home/dailydealsblogco/public_html/plugins/k2/fbcomments_k2/fbcomments_k2.php on line 16`

这是第 16 行:

class plgK2FbComments_K2 extends K2Plugin {
var $pluginName = 'fbcomments_k2';
var $pluginNameHumanReadable = 'DISQUS for K2 plugin';

public function plgK2FbComments_K2(& $subject, $params) {
    parent::__construct($subject, $params);
    // JPlugin::loadLanguage('plg_k2_fbcomments_k2');
}

谁能帮我改一下?谷歌搜索了几个小时,仍然 none 更明智。我想摆脱它的错误。

将构造函数重命名为__construct:

public function __construct(& $subject, $params) {
    parent::__construct($subject, $params);
    // JPlugin::loadLanguage('plg_k2_fbcomments_k2');
}