Hi Arnaud,
I have the same error present on my sites, which I reported also
I have made a fix for this issue, and it seems to fix the problem
Within the file /www/wp-content/plugins/all-in-one-seo-pack/aioseop_class.php
I added the following lines
function get_robots_meta() {
global $aioseop_options;
$opts = $this->meta_opts;
$page = $this->get_page_number();
$robots_meta = $tax_noindex = ”;
————————————
//PSS populate post type
$post = $this->get_queried_object();
$post_type = ”;
if ( ! empty( $post ) && ! empty( $post->post_type ) ) {
$post_type = $post->post_type;
}
————————————-
Now the error is no longer present.
I logged what is presented here
[30-Jun-2019 19:47:38 UTC] post type: page
[30-Jun-2019 19:47:38 UTC] Pagina :
[30-Jun-2019 19:49:44 UTC] post type: attachment
[30-Jun-2019 19:49:44 UTC] Pagina :
[30-Jun-2019 20:17:38 UTC] post type: page
[30-Jun-2019 20:17:38 UTC] Pagina :
In case that it is a page, you do not get a page number
In case that it is a post, you do get a pagenumber
I have not seen an empty post_type after this fix
Regards,
Peter