• Resolved johansam

    (@johansam)


    I get the following warning:

    Warning: Undefined array key “classname” in /home/mariefre/mariefredsbk.se/wp-content/plugins/simple-google-icalendar-widget/simple-google-icalendar-widget.php on line 170

    And I cant suppress it…..

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author bramwaas

    (@bramwaas)

    Hi,

    A quick look at the code tells me that that array key should exist and be filled with ‘Simple_iCal_Widget’ when the widget is proper initialized.

    It clearly is not.

    So a work-around until I have found the reason for the issue and have solved it could be to replace $args[‘classname’] by ‘Simple_iCal_Widget’ in line 170 of file simple-google-icalendar-widget.php ( see error message for complete path). I think this is possible from an administrator screen in WordPress otherwise you could use Filezilla or an other FTP client.

    Of course I will come with a solution soon

    Thread Starter johansam

    (@johansam)

    OK, many thanks! This seems to have made the trick.

    Plugin Author bramwaas

    (@bramwaas)

    Hi Johan,

    It was not difficult to reproduce the issue, even with the default Twenty Twenty-one theme. Apparently my assumption that the keys of the $args array only are filled or changed after initialization is not correct.

    In v2.4.1 that I just released, I solved it by defaulting all keys from $args that I use. This should definitively resolve this issue.

    Apologies for not testing this sufficiently with ‘WP_DEBUG’ = true.

    Kind regards,

    Bram

    Icoon voor Geverifieerd door de community
    • This reply was modified 6 months, 2 weeks ago by bramwaas.
    Thread Starter johansam

    (@johansam)

    OK, many thanks! Now it works without any warnings.

    Kind Regards

    Johan

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP warnings’ is closed to new replies.