REST API: Avoid undefined-property notice when setting parent term to 0.

Only try to access `term_id` once `$parent_term` is known to be a `WP_Term`.

Props dlh, earnjam.
Fixes #44983.

Built from https://develop.svn.wordpress.org/trunk@44965


git-svn-id: http://core.svn.wordpress.org/trunk@44796 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
K. Adam White
2019-03-21 18:59:52 +00:00
parent 03bd75f053
commit fac9f5f9fb
2 changed files with 9 additions and 5 deletions

View File

@@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-alpha-44964';
$wp_version = '5.2-alpha-44965';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.