[solved] Deprecated: Methods with the same name as their class will not be constructors ... www/plugins/content/jw_sigpro/jw_sigpro.php on line 19

  • (5 votes)
  • Written by 
  • Thursday, 16 November 2017 15:36

If you update your hosting to v7.1 & more - you can look same notification 'Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgContentJw_sigpro has a deprecated constructor in .../www/plugins/content/jw_sigpro/jw_sigpro.php on line 19'

This code fix this problem you need Open plugins/content/jw_sigpro/jw_sigpro.php find this code in line 28:

function plgContentJw_sigpro(&$subject, $params)
	{
		parent::__construct($subject, $params);

		// Define the DS constant under Joomla! 3.0
		if (!defined('DS'))
		{
			define('DS', DIRECTORY_SEPARATOR);
		}
	}

 And replase it to this code:

public function __construct(&$subject, $params) {
	parent::__construct($subject, $params);

	// Define the DS constant under Joomla! 3.8.2+
	if (!defined('DS')){
		define('DS', DIRECTORY_SEPARATOR);
	}
}

Awesome - it work done! :-)

If you see same problem with jw_sig.php  - just download free new plugin from GitHub and install it: https://github.com/joomlaworks/simple-image-gallery

1620 Read

Leave a comment

Make sure you enter all the required information, indicated by an asterisk (*). HTML code is not allowed.