Protected __clone() method causes fatal error with Avada Fusion Builder
-
Hi,
I’m experiencing a PHP fatal error caused by a conflict between Yay Currency and Avada’s Fusion Builder plugin.
Fusion Builder scans all registered widgets during AJAX requests and attempts to clone them. Yay Currency’s widget class (
Yay_Currency\Engine\Appearance\Widget) declares its__clone()method asprotected, which causes a fatal error when cloned from outside the class:PHP Fatal error: Uncaught Error: Call to protected Yay_Currency\Engine\Appearance\Widget::__clone() from global scope in fusion-builder/inc/helpers.php:2623This crashes any AJAX operation on the site. While Avada’s approach of cloning all widgets is aggressive (and I’ve submitted a bug report to them as well), the fix on Yay Currency’s side would be straightforward — either make
__clone()public, or remove the visibility restriction if the singleton pattern isn’t strictly needed for the widget class.Environment:
- WordPress 6.9.x
- Yay Currency (latest)
- PHP 8.3
- Conflicting plugin: Avada / Fusion Builder
Thanks for looking into this.
You must be logged in to reply to this topic.