This repository has been archived by the owner on Sep 27, 2022. It is now read-only.
The get_the_ID() function does not always return a post identifier #203
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When calling the "wp_update_post" function, the context of a post is not always present. While this function runs a hook and goes through Members plugin. It cause a PHP Error.
content.js:3 E_NOTICE Trying to get property of non-object - /app/plugins/members/inc/template.php:95
#24 /app/plugins/members/inc/template.php:117 - members_can_user_view_post(0, false)
#23 /app/plugins/members/inc/functions-content-permissions.php:180 - members_can_current_user_view_post(false)
#22 /wp/wp-includes/class-wp-hook.php:286 - members_content_permissions_protect('')
#21 /wp/wp-includes/plugin.php:203 - WP_Hook->apply_filters('', Array[1])
#20 /app/plugins/wordpress-seo/admin/links/class-link-watcher.php:117 - apply_filters('the_content', '')
#19 /app/plugins/wordpress-seo/admin/links/class-link-watcher.php:64 - WPSEO_Link_Watcher->process(18204, '')
#18 /wp/wp-includes/class-wp-hook.php:288 - WPSEO_Link_Watcher->save_post(18204, WP_Post)
#17 /wp/wp-includes/class-wp-hook.php:310 - WP_Hook->apply_filters(18204, Array[3])
#16 /wp/wp-includes/plugin.php:453 - WP_Hook->do_action(Array[3])
#15 /wp/wp-includes/post.php:3673 - do_action('save_post', 18204, WP_Post, true)
#14 /wp/wp-includes/post.php:3746 - wp_insert_post(Array[30], false)
#13 /app/plugins/woody-plugin/src/Modules/Importer/Importer.php:143 - wp_update_post(Array[28])
#12 /app/plugins/woody-plugin/src/Modules/Importer/Importer.php:106 - Woody\Modules\Importer\Importer->flushSlugs(Array[6], false)
#11 /wp/wp-includes/rest-api/class-wp-rest-server.php:936 - Woody\Modules\Importer\Importer->chunkProceed(WP_REST_Request)
#10 /wp/wp-includes/rest-api/class-wp-rest-server.php:321 - WP_REST_Server->dispatch(WP_REST_Request)
#9 /wp/wp-includes/rest-api.php:266 - WP_REST_Server->serve_request('/woody_plugin_...')
#8 /wp/wp-includes/class-wp-hook.php:286 - rest_api_loaded(WP)
#7 /wp/wp-includes/class-wp-hook.php:310 - WP_Hook->apply_filters('', Array[1])
#6 /wp/wp-includes/plugin.php:515 - WP_Hook->do_action(Array[1])
#5 /wp/wp-includes/class-wp.php:373 - do_action_ref_array('parse_request', Array[1])
#4 /wp/wp-includes/class-wp.php:713 - WP->parse_request('')
#3 /wp/wp-includes/functions.php:960 - WP->main('')
#2 /wp/wp-blog-header.php:16 - wp()
#1 /index.php:5