Plugin Directory

Changeset 2859760


Ignore:
Timestamp:
02/03/2023 05:04:39 PM (3 years ago)
Author:
prismtechstudios
Message:

Fix PHP warning

Location:
modern-footnotes
Files:
16 added
2 edited

Legend:

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

    r2812991 r2859760  
    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.13
     7Version:     1.4.14
    88Author:      Prism Tech Studios
    99Author URI:  http://prismtechstudios.com/
     
    1515defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    1616
    17 $modern_footnotes_version = '1.4.13';
     17$modern_footnotes_version = '1.4.14';
    1818
    1919$modern_footnotes_options = get_option('modern_footnotes_settings');
     
    380380  if (is_a( $post, 'WP_Post' )) {
    381381    $has_shortcode = FALSE;
    382     foreach ($modern_footnotes_shortcodes as $modern_footnote_shortcode) {
    383       if (has_shortcode($post->post_content, $modern_footnote_shortcode)) {
    384         $has_shortcode = TRUE;
     382    if (isset($modern_footnotes_shortcodes)) { // attempt to resolve https://wordpress.org/support/topic/error-causes-php-process-hang/ - I am not really clear how this variable could be null here, though.
     383      foreach ($modern_footnotes_shortcodes as $modern_footnote_shortcode) {
     384        if (has_shortcode($post->post_content, $modern_footnote_shortcode)) {
     385          $has_shortcode = TRUE;
     386        }
    385387      }
    386388    }
  • modern-footnotes/trunk/readme.txt

    r2812991 r2859760  
    33Tags: footnotes, citations, inline footnotes, inline citations, mobile-friendly citations, mobile-friendly footnotes
    44Requires at least: 4.6
    5 Tested up to: 6.1
    6 Stable tag: 1.4.13
     5Tested up to: 6.1.1
     6Stable tag: 1.4.14
    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.14 =
     87* Minor fix for a PHP warning where foreach was attempting to access a null object
     88
    8689= 1.4.13 =
    8790* Fixed a problem where using the hover option for footnotes would cause footnote display issues on mobile.
Note: See TracChangeset for help on using the changeset viewer.