PHP Warning: Undefined property: stdClass::$publish .. in WP Cron
-
Getting PHP Warnings in error log on a client website:
PHP Warning: Undefined property: stdClass::$publish in ../simple-tags/inc/class.client.autoterms.php on line 480
Line 480:
$current_logs_count = wp_count_posts('taxopress_logs')->publish;
Problem happens if
update_taxopress_logs()
function is called during a WP-Cron call, when currentREQUEST_URI
iswp-cron.php?doing_wp_cron
Somehow
wp_count_posts()
is returning an empty object instead of Number of posts for each status for your post type in WP Cron:stdClass Object ()
TaxoPress 3.6.4, WordPress 6.1.1
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP Warning: Undefined property: stdClass::$publish .. in WP Cron’ is closed to new replies.