I'm a PHP novice, so bear beside me if any one of my terminology is incorrect.

I've got a small PHP file (page_class.php) that defines some functions and that i include this file within the header.php of my theme:

<?php include("page_class.php"); ?>

And fundamental essentials items in page_class.php:

<?php
function curPageURL() {
 $pageURL = 'http';
 if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
 $pageURL .= "://";
 if ($_SERVER["SERVER_PORT"] != "80") {
  $pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
 } else {
  $pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
 }
 return $pageURL;
}

function get_subdomain() {
    $page_url = curPageURL();
    $parts = split('\.', $_SERVER["SERVER_NAME"]);
    return $parts[0];
}

function get_body_class() {
    $subdomain = get_subdomain();
    if ($subdomain == "keyes") {
        $path_parts = split('/', $_SERVER["REQUEST_URI"]);
        $clazz = $path_parts[1];
    }
    else {
        $clazz = $subdomain;
    }
    if ($clazz == "greasemonkey" || $clazz == "wordpress") {
        $clazz = "work";
    }
    if ($clazz == "") {
        $clazz = "home";
    }
    return $clazz;
}
?>

I call get_body_class in header.php:

<body class="<?php echo get_body_class(); ?>">

This setup labored in WordPress MU 2.7.1. I lately upgraded to two.8.6 also it broke. After I visited any page around the blog the screen was blank.

After a little analysis I determined that by altering the function names (I prefixed all of them with jk_) it labored again.

I suspected it was a naming conflict, but could not find any. I question inflict PHP or WordPress devs have idea why this occurs.

get_body_class() seems in fact to be there since 2.8. You are only some of the one that had the issue: See here.

Incidentally, even though it is the best factor to possess error confirming switched off on the production server, you might want to transform it up some when you get errors like this.

error_reporting(E_ALL ^ E_NOTICE);

I have just downloaded the causes of wordpress 2.9 (not the identical version as yours, The truth is that, but it is the final one, and also the simplest to obtain from wordpress.org), also it appears there's already a current get_body_class function :

$ grep -rn 'get_body_class' *
wp-includes/post-template.php:354:      echo 'class="' . join( ' ', get_body_class( $class ) ) . '"';
wp-includes/post-template.php:365:function get_body_class( $class = '' ) {

It appears that function is determined in post-template.php (line 365 in wordpress 2.9) which describes the conflict, as you cannot have two functions with similar title, in PHP.