Plugin Directory

Changeset 2097481


Ignore:
Timestamp:
05/29/2019 07:40:23 PM (7 years ago)
Author:
joerhoney
Message:

Fixed PHP notice on backend, "Undefined offset: 0" line 113.

Location:
addfunc-head-footer-code
Files:
5 added
3 edited

Legend:

Unmodified
Added
Removed
  • addfunc-head-footer-code/tags/2.2/addfunc-head-footer-code.php

    r2073508 r2097481  
    111111    $queue = array();
    112112    preg_match($pattern,$tape,$queue);
    113     $q = $queue[0];
     113    $q = $queue[0] ? $queue[0] : array();
    114114    $q = $q.$body_code->output_body_code();
    115115    echo preg_replace($pattern,$q,$tape);
  • addfunc-head-footer-code/trunk/addfunc-head-footer-code.php

    r2073508 r2097481  
    44    Plugin URI:
    55    Description: Allows administrators to add code to the <head> and/or <footer> of an individual post and/or site-wide. Ideal for scripts such as Google Analytics conversion tracking codes and any other general or page-specific JavaScript.
    6     Version: 2.2
     6    Version: 2.3
    77    Author: AddFunc
    88    Author URI: http://profiles.wordpress.org/addfunc
     
    107107  function aFHFCBuffPlay(){
    108108    $body_code = new aFHFCClass;
    109     $tape = ob_get_clean();
    110109    $pattern = '/<[bB][oO][dD][yY]\s[A-Za-z]{2,5}[A-Za-z0-9 "_,=%*\'\/():;\[\]\-\.]+>|<body>/';
    111110    $queue = array();
     111    $tape = ob_get_clean();
    112112    preg_match($pattern,$tape,$queue);
    113     $q = $queue[0];
    114     $q = $q.$body_code->output_body_code();
     113    $q = empty($queue[0]) ? '' : $queue[0].$body_code->output_body_code();
    115114    echo preg_replace($pattern,$q,$tape);
    116115  }
  • addfunc-head-footer-code/trunk/readme.txt

    r2073508 r2097481  
    66Tags: head code, footer code, add to head, per page, tracking code, Google Analytics, javascript, meta tags, wp_head, wp_footer, body tag code, opening body tag
    77Requires at least: 3.0.1
    8 Tested up to: 5.1
    9 Stable tag: 2.2
     8Tested up to: 5.2
     9Stable tag: 2.3
    1010License: GPLv2 or later
    1111License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6565== Changelog ==
    6666
     67= 2.3 =
     6823 May 2019
     69
     70*   Fixes a PHP notice, which appeared on the login dialog when WP_DEBUG was ON. (I think I actually got it this time.)
     71
    6772= 2.2 =
    687323 Apr 2019
    6974
    70 *   Fixes a PHP notice, which appeared on the login dialog when WP_DEBUG was ON.
     75*   Fixes a PHP notice, which appeared on the login dialog when WP_DEBUG was ON. Edit: not fixed, just a different error.
    7176
    7277= 2.1 =
Note: See TracChangeset for help on using the changeset viewer.