plugin breaks admin page on PHP7


  • Default avatar
    sklep    
     7 years ago
    0

    Hi


    I upgraded joomla to 3.6.4

    VM 3.0.18

    Acymailing to 5.5.0

    AwoCoupon 2.5.0 pro

    PHP 7.0.12


    I have problem with plugin

    AcyMailing Tag : AwoCoupon

    I can't add or edit joomla users while this plugin is on.

    -------------------

    With active plugin AcyMailing Tag : AwoCoupon

    When I turn Error Reporting to Maximum then I can see only signs without any error (while adding or editing users account):

    +Z`uXSMs+M]d/x}& Cx^1w};08 ÞDx_O1tL"?NYH:$S}` = 倉Ga2].cP1.NhY UJ-C#xbRE>!DL$LGRq|ӡ64Uyˆ,Uy;*&RvѦuXN<I cf(6n ylDTe`ru%0X~nQ1pjuxCt߁'D]p 4a`XQ]YJk!?8tbs2B8fbITK


    When I turn also Debug System on then I can add or edit users with one report:

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; plgAcymailingAwoCoupon has a deprecated constructor in..../plugins/acymailing/awocoupon/awocoupon.php on line 14

    I have checked it and I have:

    class plgAcymailingAwoCoupon extends JPlugin {


    function __construct(&$subject, $config){

    // load language file

    $language = JFactory::getLanguage();

    $language->load('com_awocoupon');

    ---------------------------------------

    Could you help me?


    Radek

  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    I am a little confused.  In the file you have

    <?php
    </p><p>class plgAcymailingAwoCoupon extends JPlugin {</p>
    <
    p>    function __construct(&$subject$config){</p><p>
    ?>

    And you are receiving the constructor name warning?  That makes no sense.  Now if it looked like this, then that would make more sense:

    <?php
    </p><p>class plgAcymailingAwoCoupon extends JPlugin {</p>
    <
    p>    function plgAcymailingAwoCoupon(&$subject$config){</p><p>
    ?>

    And this is causing you not to be able to edit users?  I have tested this plugin on php 7 and not getting this behavior.  I thought you might be having the problem in this post:

    https://awodev.com/forum/awocoupon/help-section/cart-page-error-after-activated-plugin-acymailing-tag-awocoupon


    But not sure as you seem to just have a warning and not an error

  • Default avatar
    sklep    
     7 years ago  last edited 7 years ago
    0

    Hi

    This time I didn't get error but strange letters remained.

    - What I see when your plugin is on (while editing any user)

    - I'm terning off your plugin


    - What I see in user account after turning off your plugin:



    When your plugin is on and 'System Debug' is on then I can edit users.

    I can give you admin access to testing version of my website.

    Radek


    Hi again

    Yes, ANSI solved my problem. Thank you.


    Radek