PHP Warning: Attempt to read property “post_type” on null
-
Getting these warnings in
debug.log
[02-Aug-2023 19:53:10 UTC] PHP Warning: Attempt to read property "post_type" on null in ../wp-content/plugins/job-postings/include/class-job-entry.php on line 391
Lines 390, 391 of
class-job-entry.php
$screen = get_current_screen(); //verify which page we're on if ('job-entry' == $screen->post_type && 'edit' == $screen->base ) {
A fix could be similar to this:
if (!empty($screen->post_type) && 'job-entry' == $screen->post_type && 'edit' == $screen->base ) {
Jobs for WordPress 2.6.2, WordPress 6.2.2
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘PHP Warning: Attempt to read property “post_type” on null’ is closed to new replies.