Undefined property: stdClass::$status on post
-
With WP_DEBUG turned on I get the following two warnings when submitting a post that I haven’t entered any map data for:
Notice: Undefined property: stdClass::$status in /mnt/stor09-wc1-ord1/731806/www.mypolicedev.com/web/content/wp-content/plugins/pronamic-google-maps/classes/Pronamic_Google_Maps_Admin.php on line 225
Notice: Undefined property: stdClass::$status in /mnt/stor09-wc1-ord1/731806/www.mypolicedev.com/web/content/wp-content/plugins/pronamic-google-maps/classes/Pronamic_Google_Maps_Admin.php on line 225
This line
update_post_meta($postId, Pronamic_Google_Maps_Post::META_KEY_GEOCODE_STATUS, $pgm->status);
should be changed to
update_post_meta($postId, Pronamic_Google_Maps_Post::META_KEY_GEOCODE_STATUS, isset($pgm->status) ? $pgm->status : null);
The topic ‘Undefined property: stdClass::$status on post’ is closed to new replies.