Plugin Directory

Changeset 3245050


Ignore:
Timestamp:
02/22/2025 09:23:33 PM (13 months ago)
Author:
era404
Message:

Fixed deprecation warnings that appeared in PHP8+, found by @thomasprice61 (thank you)

Location:
stafflist/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stafflist/trunk/readme.txt

    r3232922 r3245050  
    103103
    104104== Changelog ==
     105= 3.2.5 =
     106* Fixed deprecation warnings that appeared in PHP8+, found by @thomasprice61 (thank you);
     107
    105108= 3.2.4 =
    106109* Security updates recommended by Colin Xu (thank you);
  • stafflist/trunk/stafflist.php

    r3232922 r3245050  
    44Plugin URI: http://wordpress.org/plugins/stafflist/
    55Description: A super simplified staff directory tool
    6 Version: 3.2.4
     6Version: 3.2.5
    77Author: era404
    88Author URI: http://www.era404.com
     
    826826        //columns to use
    827827        if(!$allcols){
     828            $allcols = array();
    828829            $nonstd = $wpdb->get_results("SELECT id,name,colpos,active,
    829830                                          CASE WHEN id<6 THEN name ELSE concat('col',id) END AS col
     
    843844        foreach($allcols as $ck=>$ct){
    844845            if(trim($ct)=="") continue; //skip unassigned columns
    845             if(array_key_exists($ck, $s) && trim($s[ $ck ])!="" && !is_null($s[ $ck ])){
     846            if(array_key_exists($ck, $s) && trim($s[ $ck ]??"")!="" && !is_null($s[ $ck ])){
    846847                //handling for images
    847848                if(substr($s[ $ck ],0,4)=="img:"){
    848849                    $t[ 'img' ] = strip_tags(trim(substr($s[ $ck ],4)));
    849850                } else {
    850                     $t[ $ct ] = str_replace("'", '&apos;', trim($s[ $ck ]));
     851                    $t[ $ct ] = str_replace("'", '&apos;', trim($s[ $ck ]??""));
    851852                }
    852853            }
Note: See TracChangeset for help on using the changeset viewer.