[Ultimate Branding] Branda's Breaking my Heart (I mean my Local Site)

Branda's last update started breaking my Local Site. The error:

Warning: count(): Parameter must be an array or an object that implements Countable in /app/public/wp-content/plugins/ultimate-branding/ultimate-branding-files/classes/class.ub.helper.php on line 677

  • Nithin

    Hi Fabio Fava,

    Hope you are doing good today. :slight_smile:

    The above shared log seems to be more related to warning message, and it shouldn't really break the plugin in any way. This warning seems to be part of PHP v 7.2, when a null count is thrown the above mentioned warning gets generated.

    However, I'm not able to replicate such an issue in my side, seems like it'll only get triggered in specific use case. Are you able to replicate the same in a live server, if yes, could you please enable support access to your site, so that we could see which exact module, or action is causing this behaviour, and see what could be done to help get this fixed?

    You can also try whether changing the following 677 line under, wp-content/plugins/ultimate-branding/ultimate-branding-files/classes/class.ub.helper.php

    From:
    if ( 0 < count( $v ) && isset( $v[0]['meta'] ) ) {

    To:

    if ( $v && 0 < count( $v ) && isset( $v[0]['meta'] ) ) {

    And check whether that helps, or not. Please do get back to us via ticket once support access is enabled, so that we could give a closer look, and see how to replicate this behaviour, so that we could get this patched up.

    You can grant access from WPMU DEV > Support > Support Access > Grant Access, or check this manual: https://premium.wpmudev.org/docs/getting-started/getting-support/#chapter-5

    Kind Regards,
    Nithin

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.