Plugin Directory

Changeset 3165848


Ignore:
Timestamp:
10/09/2024 02:19:05 PM (18 months ago)
Author:
HoltesDesign
Message:

Updated to version 1.7.13 with PHP casting fixes for array_map() argument two and updated documentation.

Location:
hellodialog/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • hellodialog/trunk/index.php

    r3165845 r3165848  
    44 * Plugin URI: https://www.hellodialog.com
    55 * Description: This plugin connects Wordpress to the Hellodialog API.
    6  * Version: 1.7.12
     6 * Version: 1.7.13
    77 * Author: Webreact
    88 * Author URI: https://www.webreact.nl
     
    369369        }
    370370
    371         /**
    372          * Cast variable to array.
    373          *
    374          * @param $variable
    375          * @return array
    376          */
    377         function hd_to_array($variable) {
    378             return (array) $variable;
    379         }
    380 
    381371        /**
    382372         * Save the metadate when the custom post type is mutated.
     
    414404             */
    415405            if( isset ( $_POST['custom-meta-box2'] ) ) {
    416                 $custom2   = hd_to_array($_POST['custom-meta-box2']);
    417                 $old_meta2 = hd_to_array(get_post_meta($post->ID, '_custom-meta-box2', true));
     406                $custom2   = (array) $_POST['custom-meta-box2'];
     407                $old_meta2 = (array) get_post_meta($post->ID, '_custom-meta-box2', true);
    418408
    419409                $custom2 = array_map( 'sanitize_text_field', $custom2 );
     
    439429            if( isset ( $_POST['custom-meta-box'] ) ) {
    440430                // Get input & sanitize after
    441                 $custom   = hd_to_array($_POST['custom-meta-box']);
    442                 $old_meta = hd_to_array(get_post_meta($post->ID, '_custom-meta-box', true));
     431                $custom   = (array) $_POST['custom-meta-box'];
     432                $old_meta = (array) get_post_meta($post->ID, '_custom-meta-box', true);
    443433
    444434                // Sanitize input
  • hellodialog/trunk/readme.txt

    r3165845 r3165848  
    55Requires at least: 4.8
    66Tested up to: 6.4
    7 Stable tag: 1.7.12
     7Stable tag: 1.7.13
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4848
    4949== Changelog ==
     50= 1.7.13 =
     51* Fixed type error on array_map() argument two with default php casting.
     52
    5053= 1.7.12 =
    5154* Fixed type error on array_map() argument two.
Note: See TracChangeset for help on using the changeset viewer.