PHP Warning: count(): Framework Widget - by Nico313

7 replies3 participantsUpdated by Olga Barlow

  • Avatar: Nico313
    Nico313
    Participant

    Hello,

    Just you know :

    [15-Apr-2019 12:24:32 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /wp-content/themes/legenda/framework/widgets.php on line 307

    Please fix this in the next update.

    regards

    7 Answers

    Avatar: Olga Barlow
    Olga Barlow
    Participant

    Hello,

    We can’t reproduce this warning on our test installations. Could you, please, provide link to your site, temporary Dashboard and FTP access and tell me your actions when you get this warning?

    Regards

    Avatar: Nico313
    Nico313
    Participant

    This error is display by Error.log of the server (host)

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff

    Please change code of widgets.php file – https://prnt.sc/ncrha4 and check the log then.
    Let us know the result.
    If you need further assistance, provide temporary wp-admin and FTP access, so we can take a closer look.

    Regards

    Avatar: Nico313
    Nico313
    Participant

    Hi,
    Always,
    [03-Jun-2019 08:02:13 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/clients/nico313/prod/aplustemp/wp-content/themes/legenda/framework/widgets.php on line 307

    Avatar: Olga Barlow
    Olga Barlow
    Participant

    Hello,

    Provide us with Dashboard and FTP access to your site to check and help you.

    Regards

    Avatar: Nico313
    Nico313
    Participant

    Hi,

    i fix this :

    <?php if (is_array($sb) && count($sb) > 0): ?>
    instead of
    <?php if (is_array($sb) && count($sb > 0)): ?>

    Regards

    Avatar: Olga Barlow
    Olga Barlow
    Participant

    Hello,

    Sorry, seems we fixed the first part of the code with array and missed the second one. Your version is correct!

    Regards

Want to reply? Log in, or register with your ThemeForest purchase code, to reply to this topic.

Login / Register