PHP Warning: Attempt to read property “post_type” on string
-
Hi,
every now & then this pops up:
PHP Warning: Attempt to read property “post_type” on string in /srv/wp-content/plugins/woo-custom-and-sequential-order-number/includes/classes/class-wcson-order-number.php on line 68
Unfortunately I only see it later in the logs, without knowing how to reproduce it. Fortunately, ultimately no negative effects as far as I can tell.
From a first look, it seems something calls
wcson_order_number
with its second$post
parameter as the default empty string, and that’s then attempted to be compared to'shop_order' === $post->post_type
in that line.Version info:
WCaSON: 2.6.0
WC 6.3.1
WP 5.9.3
PHP 8.0.17`
- The topic ‘PHP Warning: Attempt to read property “post_type” on string’ is closed to new replies.