Could you send me the link to your code where you call is_humans()?
A link wouldn’t do you any good as the only thing on the page is the error mentioned above. This is the erroneous code:
if (function_exists('is_admin'))
{
$is_humans = (!function_exists('is_humans')) ? false : is_humans();
if (!is_admin() && !$is_humans)
{
add_action('template_redirect', 'wp_html_compression_start', -1);
// In case above fails (it does sometimes.. ??)
add_action('get_header', 'wp_html_compression_start');
}
}
If I comment out the $is_humans line, it works without error; however, humans.txt gets compressed.
You’re calling is_humans() before $wp_query is initialized. The earliest you can call it, is with the setup_theme action, that’s when the WordPress Object $wp = new WP(); has been initialized in wp-settings.php.
Best thing to do in your case is to call is_humans() in your wp_html_compression_start(), the template_redirect action is perfect for that.
Ahh, ok. I rarely work with the wp database, and never work with any other dbs; not my thing.
Thanks for the suggestion; I’ll do that!