Version Description
July 3rd, 2022 =
Fixed: Resolve potential PHP errors from Relationship/File field saves by ensuring consistent array structures.
Download this release
Release Info
| Developer | sc0ttkclark |
| Plugin | |
| Version | 2.8.22.1 |
| Comparing to | |
| See all releases | |
Code changes from version 2.8.22 to 2.8.22.1
- classes/fields/file.php +10 -0
- classes/fields/pick.php +8 -0
- init.php +2 -2
- readme.txt +5 -1
classes/fields/file.php
CHANGED
|
@@ -677,6 +677,16 @@ class PodsField_File extends PodsField {
|
|
| 677 |
self::$api = pods_api();
|
| 678 |
}
|
| 679 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 680 |
// Handle File title saving.
|
| 681 |
foreach ( $value as $id ) {
|
| 682 |
$title = false;
|
| 677 |
self::$api = pods_api();
|
| 678 |
}
|
| 679 |
|
| 680 |
+
if ( null === $value ) {
|
| 681 |
+
$value = [];
|
| 682 |
+
} elseif ( ! is_array( $value ) || isset( $value['id'] ) ) {
|
| 683 |
+
$value = [
|
| 684 |
+
$value,
|
| 685 |
+
];
|
| 686 |
+
}
|
| 687 |
+
|
| 688 |
+
$value = array_unique( array_filter( $value ) );
|
| 689 |
+
|
| 690 |
// Handle File title saving.
|
| 691 |
foreach ( $value as $id ) {
|
| 692 |
$title = false;
|
classes/fields/pick.php
CHANGED
|
@@ -1739,6 +1739,14 @@ class PodsField_Pick extends PodsField {
|
|
| 1739 |
$current_ids = [];
|
| 1740 |
$remove_ids = [];
|
| 1741 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1742 |
$value_ids = array_unique( array_filter( $value ) );
|
| 1743 |
|
| 1744 |
$related_data = pods_static_cache_get( $options['name'] . '/' . $options['id'], __CLASS__ . '/related_data' ) ?: [];
|
| 1739 |
$current_ids = [];
|
| 1740 |
$remove_ids = [];
|
| 1741 |
|
| 1742 |
+
if ( null === $value ) {
|
| 1743 |
+
$value = [];
|
| 1744 |
+
} elseif ( ! is_array( $value ) ) {
|
| 1745 |
+
$value = [
|
| 1746 |
+
$value,
|
| 1747 |
+
];
|
| 1748 |
+
}
|
| 1749 |
+
|
| 1750 |
$value_ids = array_unique( array_filter( $value ) );
|
| 1751 |
|
| 1752 |
$related_data = pods_static_cache_get( $options['name'] . '/' . $options['id'], __CLASS__ . '/related_data' ) ?: [];
|
init.php
CHANGED
|
@@ -10,7 +10,7 @@
|
|
| 10 |
* Plugin Name: Pods - Custom Content Types and Fields
|
| 11 |
* Plugin URI: https://pods.io/
|
| 12 |
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
|
| 13 |
-
* Version: 2.8.22
|
| 14 |
* Author: Pods Framework Team
|
| 15 |
* Author URI: https://pods.io/about/
|
| 16 |
* Text Domain: pods
|
|
@@ -43,7 +43,7 @@ if ( defined( 'PODS_VERSION' ) || defined( 'PODS_DIR' ) ) {
|
|
| 43 |
add_action( 'init', 'pods_deactivate_pods_ui' );
|
| 44 |
} else {
|
| 45 |
// Current version.
|
| 46 |
-
define( 'PODS_VERSION', '2.8.22' );
|
| 47 |
|
| 48 |
// Current database version, this is the last version the database changed.
|
| 49 |
define( 'PODS_DB_VERSION', '2.3.5' );
|
| 10 |
* Plugin Name: Pods - Custom Content Types and Fields
|
| 11 |
* Plugin URI: https://pods.io/
|
| 12 |
* Description: Pods is a framework for creating, managing, and deploying customized content types and fields
|
| 13 |
+
* Version: 2.8.22.1
|
| 14 |
* Author: Pods Framework Team
|
| 15 |
* Author URI: https://pods.io/about/
|
| 16 |
* Text Domain: pods
|
| 43 |
add_action( 'init', 'pods_deactivate_pods_ui' );
|
| 44 |
} else {
|
| 45 |
// Current version.
|
| 46 |
+
define( 'PODS_VERSION', '2.8.22.1' );
|
| 47 |
|
| 48 |
// Current database version, this is the last version the database changed.
|
| 49 |
define( 'PODS_DB_VERSION', '2.3.5' );
|
readme.txt
CHANGED
|
@@ -5,7 +5,7 @@ Tags: pods, custom post types, custom taxonomies, content types, custom fields,
|
|
| 5 |
Requires at least: 5.5
|
| 6 |
Tested up to: 6.0
|
| 7 |
Requires PHP: 5.6
|
| 8 |
-
Stable tag: 2.8.22
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
|
@@ -156,6 +156,10 @@ Pods really wouldn't be where it is without all the contributions from our [dono
|
|
| 156 |
|
| 157 |
== Changelog ==
|
| 158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
= 2.8.22 - July 3rd, 2022 =
|
| 160 |
|
| 161 |
* Added: Support `IN` and `NOT IN` comparisons for the Pods Templating `[if]` conditional shortcode that checks if the current value is/isn't within a comma-separated list of values. (@sc0ttkclark)
|
| 5 |
Requires at least: 5.5
|
| 6 |
Tested up to: 6.0
|
| 7 |
Requires PHP: 5.6
|
| 8 |
+
Stable tag: 2.8.22.1
|
| 9 |
License: GPLv2 or later
|
| 10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 11 |
|
| 156 |
|
| 157 |
== Changelog ==
|
| 158 |
|
| 159 |
+
= 2.8.22.1 - July 3rd, 2022 =
|
| 160 |
+
|
| 161 |
+
* Fixed: Resolve potential PHP errors from Relationship/File field saves by ensuring consistent array structures.
|
| 162 |
+
|
| 163 |
= 2.8.22 - July 3rd, 2022 =
|
| 164 |
|
| 165 |
* Added: Support `IN` and `NOT IN` comparisons for the Pods Templating `[if]` conditional shortcode that checks if the current value is/isn't within a comma-separated list of values. (@sc0ttkclark)
|
