Notice: Undefined variable: post_id
-
I’m seeing the following notice being thrown during different actions in the admin seemingly unrelated to your plugin.
Notice: Undefined variable: post_id in /var/www/html/wp-content/plugins/wp-notification-bell/admin/admin.php on line 426This last time this was thrown I was in the admin syncing fields with the Advanced Custom Fields plugin although have seen it while doing other core functions.
The logic is being called within the
save_postaction and it’s returning the $poist_id which doesn’t exist. In this case, thesave_postaction doesn’t use a return value so I suspect thesereturn $post_id;lines within this function just need to be updated to return void….return;to solve the issue.
The topic ‘Notice: Undefined variable: post_id’ is closed to new replies.