Plugin Directory

Changeset 3040417


Ignore:
Timestamp:
02/23/2024 10:22:57 PM (2 years ago)
Author:
prismtechstudios
Message:

Fix PHP warning when $GLOBALSpost? was not a WP_POST instance

Location:
modern-footnotes
Files:
16 added
2 edited

Legend:

Unmodified
Added
Removed
  • modern-footnotes/trunk/modern-footnotes.php

    r2980695 r3040417  
    55Text Domain: modern-footnotes
    66Description: Add inline footnotes to your post via the footnote icon on the toolbar for editing posts and pages. Or, use the [mfn] or [modern_footnote] shortcodes [mfn]like this[/mfn].
    7 Version:     1.4.17
     7Version:     1.4.18
    88Author:      Prism Tech Studios
    99Author URI:  http://prismtechstudios.com/
     
    1515defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    1616
    17 $modern_footnotes_version = '1.4.17';
     17$modern_footnotes_version = '1.4.18';
    1818
    1919$modern_footnotes_options = get_option('modern_footnotes_settings');
     
    282282function modern_footnotes_get_post_scope_id() {
    283283  if (isset($GLOBALS['post'])) {
     284    $global_post = $GLOBALS['post'];
     285    if ($global_post instanceof WP_Post) {
     286      $global_post_id = $global_post->ID;
     287    } else {
     288      $global_post_id = $global_post;
     289    }
    284290    if (isset($GLOBALS['modern_footnotes_active_query'])) {
    285       return spl_object_hash($GLOBALS['modern_footnotes_active_query']) . '_' . $GLOBALS['post']->ID;
     291      return spl_object_hash($GLOBALS['modern_footnotes_active_query']) . '_' . $global_post_id;
    286292    } else {
    287       return 'post_' . $GLOBALS['post']->ID;
     293      return 'post_' . $global_post_id;
    288294    }
    289295  } else {
  • modern-footnotes/trunk/readme.txt

    r2980695 r3040417  
    33Tags: footnotes, citations, inline footnotes, inline citations, mobile-friendly citations, mobile-friendly footnotes
    44Requires at least: 4.6
    5 Tested up to: 6.3.2
    6 Stable tag: 1.4.17
     5Tested up to: 6.4.3
     6Stable tag: 1.4.18
    77License: GNU General Public License v2
    88License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html
     
    8484== Changelog ==
    8585
     86= 1.4.18 =
     87* Fix PHP warning when $GLOBALS['post'] was not a WP_POST instance
     88
    8689= 1.4.17 =
    8790* Security fix for XSS issue. Thanks to cleantalk and Dmitrii Ignatyev for identifying the issue.
Note: See TracChangeset for help on using the changeset viewer.