Yoast/wordpress-seo — pull request #948 by SergeyBiryukov (2014-03-26 13:15:31+00:00)
Title: Fix PHP warnings when post_type is an array

WordPress SEO expects `get_query_var( 'post_type' )` to be a string, but it can also be an array. This leads to a PHP warning when viewing a post type archive:
```
Warning: Illegal offset type in isset or empty in wp-includes/post.php on line 1060
```
The warning comes from `WPSEO_Frontend::canonical()`, where `get_query_var( 'post_type' )` is passed directly to `get_post_type_archive_link()`, which only accepts a string.

Sample code to reproduce the issue:
```
function query_multiple_post_types( $query ) {
if ( ! is_admin() && $query->is_main_query() ) {
$query->set( 'post_type', array( 'post', 'page' ) );
}
}
add_action( 'pre_get_posts', 'query_multiple_post_types' );
```