• Getting these warnings in debug.log

    [20-Jan-2025 09:03:50 UTC] PHP Warning:  Undefined array key "timeline_container_shema" in .../wp-content/plugins/event-post/inc/class-settings.php on line 508
    [20-Jan-2025 09:03:50 UTC] PHP Warning: Undefined array key "timeline_item_shema" in .../wp-content/plugins/event-post/inc/class-settings.php on line 508

    Current code:

    504:		<textarea name="ep_settings[<?php echo $args['name']; ?>]"
    505: style="<?php echo isset($args['input-style']) ? $args['input-style'] : null ?>"
    506: id="<?php echo $args['name']; ?>"
    507: class="regular-text <?php echo isset($args['input-class']) ? $args['input-class'] : null ?>"
    508: ><?php echo EventPost()->settings[$args['name']]; ?></textarea>

    When opening settings page of plugin, the two above mentioned array keys passed via $args['name'] when calling function EventPost()->settings[$args['name']]; do not exist in settings.

    Suggested fix: Check if array keys exists before use.

    Event post 5.9.8, WordPress 6.4.5

Viewing 1 replies (of 1 total)
  • Thread Starter Ov3rfly

    (@ov3rfly)

    Please check if array keys exists before use, it is possible that they do not exist in settings here.

    Event post 5.9.11

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.