• Couple of fixes to remove warnings when using php 8.2 with error reporting on.

    diff --git a/admin/general_settings.php b/admin/general_settings.php
    index 00b4670..8fcb02f 100644
    --- a/admin/general_settings.php
    +++ b/admin/general_settings.php
    @@ -3,6 +3,8 @@ class wp_lightbox_2_general_settings_page{
    private $menu_name;
    private $databese_settings;
    public $initial_values;
    + public $plugin_url;
    + public $plugin_path;


    function __construct($params){
    @@ -240,4 +242,4 @@ class wp_lightbox_2_general_settings_page{
    }


    - ?>
    \ No newline at end of file
    + ?>
    diff --git a/wp-lightbox-2.php b/wp-lightbox-2.php
    index d0ab894..d461467 100644
    --- a/wp-lightbox-2.php
    +++ b/wp-lightbox-2.php
    @@ -151,8 +151,8 @@ function jqlb_lightbox_comment($comment){

    function jqlb_autoexpand_rel_wlightbox($content) {
    if(get_option('jqlb_automate') == 1){
    - global $post;
    - $id = ($post->ID) ? $post->ID : -1;
    + global $post;
    + $id = isset($post->ID) ? $post->ID : -1;
    $content = jqlb_do_regexp($content, $id); //legacy regex function when images don't have rel tags
    $content = wplbtwo_do_regexp($content, $id);
    }
  • You must be logged in to reply to this topic.