Closed georgos-g closed 2 years ago
I'm getting the same error on the __wakeup()
function:
[24-Mar-2022 09:30:35 UTC] PHP Warning: The magic method ACFFieldOpenstreetmap\Core\Singleton::__wakeup() must have public visibility in /public_html/wp-content/plugins/acf-openstreetmap-field/include/ACFFieldOpenstreetmap/Core/Singleton.php on line 52
https://daylerees.com/php-patterns-singleton/ suggests using the following:
/**
* Disable the cloning of this class.
*
* @return void
*/
final public function __clone()
{
throw new Exception('Feature disabled.');
}
/**
* Disable the wakeup of this class.
*
* @return void
*/
final public function __wakeup()
{
throw new Exception('Feature disabled.');
}
I'm getting the same error on the __wakeup()
function:
[24-Mar-2022 09:30:35 UTC] PHP Warning: The magic method ACFFieldOpenstreetmap\Core\Singleton::__wakeup() must have public visibility in /public_html/wp-content/plugins/acf-openstreetmap-field/include/ACFFieldOpenstreetmap/Core/Singleton.php on line 52
https://daylerees.com/php-patterns-singleton/ suggests using the following:
/**
* Disable the cloning of this class.
*
* @return void
*/
final public function __clone()
{
throw new Exception('Feature disabled.');
}
/**
* Disable the wakeup of this class.
*
* @return void
*/
final public function __wakeup()
{
throw new Exception('Feature disabled.');
}
changed _clone () function visibility to public to prevent error messages in wordpress admin after update to php 8