Deprecated : Creation of dynamic property AwoCoupon


  • Default avatar
    eric65    
     a year ago
    0

    Hello,

    Joomla 4.3.4 | Virtuemart 4.0.12 | AwoCoupon 4.0.0.6

    With Php 8.2, 2 Errors : Deprecated : Creation of dynamic property

    Deprecated : Creation of dynamic property AwoCoupon::$lang is deprecated in /.../administrator/components/com_awocoupon/helper/awocoupon.php on line 83

    Deprecated : Creation of dynamic property AwoCoupon::$profile is deprecated in /.../administrator/components/com_awocoupon/helper/awocoupon.php on line 85

    With Php 8.1, there is no Error

    Thank you to fix it

    Regards,
    Eric
  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    A quick fix for that is in the file
    administrator/components/com_awocoupon/helper/awocoupon.php around the begining, update

    <?php
    class AwoCoupon {
    ?>

    To
    <?php
    #[AllowDynamicProperties]
    class AwoCoupon {
    ?>