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

This topic has 8 replies, 3 voices, and was last updated 5 years, 6 months ago ago by Olga Barlow

  • Avatar: Nico313
    Nico313
    Participant
    April 15, 2019 at 16:52

    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
    Support staff
    April 16, 2019 at 09:30

    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
    April 16, 2019 at 21:38

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

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    April 17, 2019 at 07:35

    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
    June 3, 2019 at 10:27

    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
    Support staff
    June 3, 2019 at 10:52

    Hello,

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

    Regards

    Avatar: Nico313
    Nico313
    Participant
    June 5, 2019 at 08:59

    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
    Support staff
    June 5, 2019 at 15:13

    Hello,

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

    Regards

  • Viewing 8 results - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.