Skip to content

Commit

Permalink
Do not save fields without id. Fix for custom table extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
rilwis committed Mar 26, 2018
1 parent ffe3b90 commit 4b805b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions inc/field.php
Expand Up @@ -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'];

Expand Down

0 comments on commit 4b805b1

Please sign in to comment.