• Resolved rodrigogutierrez

    (@rodrigogutierrez)


    Hello,

    I’m trying to install this plugin, but I receive the following error:

    Warning: Invalid argument supplied for foreach() in
    E:\Home\acoesespeciais\Web\generali\wp-content\plugins\birthdays-widget\class-birthdays-widget-installer.php
    on line
    71

    Please, I would like to know if there is a fix to this problem.

    Thanks,
    Rodrigo

    https://www.ads-software.com/plugins/birthdays-widget/

Viewing 1 replies (of 1 total)
  • Plugin Author Sudavar

    (@sudavar)

    Hi there, and thank you for using our plugin.

    The bug you mentioned is fixed and will be inlcuded in the next version. If you want to address it before the update please go ahead and replace in file class-birthdays-widget-installer.php at line 71:

    foreach( $birthdays_settings[ 'roles' ] as $role ) {
            $tmp = get_role( $role[ 0 ] );
            $tmp->add_cap( 'birthdays_list' );
    }

    and make it like this:

    $birthdays_settings = maybe_unserialize( $birthdays_settings );
    foreach( $birthdays_settings[ 'roles' ] as $role ) {
            $tmp = get_role( $role );
            $tmp->add_cap( 'birthdays_list' );
    }

    PS: If everything works and you like our work, please consider leaving a rating.

Viewing 1 replies (of 1 total)
  • The topic ‘installation error’ is closed to new replies.