From 4b805b1653ed8fdf8155428ed15718aac20a4878 Mon Sep 17 00:00:00 2001 From: Anh Date: Mon, 26 Mar 2018 15:12:25 +0700 Subject: [PATCH] Do not save fields without id. Fix for custom table extension. --- inc/field.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inc/field.php b/inc/field.php index d0fc64bd7..e5b4bef2e 100644 --- a/inc/field.php +++ b/inc/field.php @@ -286,6 +286,9 @@ public static function value( $new, $old, $post_id, $field ) { * @param array $field The field parameters. */ public static function save( $new, $old, $post_id, $field ) { + if ( empty( $field['id'] ) ) { + return; + } $name = $field['id']; $storage = $field['storage'];