I don't get this warning, so there may be a copy paste issue. However making the test, I noticed an error even worse.
<?php
/*
Plugin name: forces Polylang linking to author translation
*/
add_filter('pll_translation_url', 'pll_author_translation_url', 10, 2);
function pll_author_translation_url($url, $lang) {
if (is_author()) {
global $polylang;
return $polylang->links->get_archive_url($polylang->model->get_language($lang));
}
return $url;
}
It enables the link to an empty author page (a page not found in twenty twelve).