What is causing this strange PHP fatal error?
<p>I have a generic Logger class that looks like this:</p>

<pre><code>class Logger {

  ...

  public function add($userId, $siteId, $logTypeId, $message) {
    $Log = LogMapper::create();
    $Log-&gt;setUserId($userId);
    $Log-&gt;setSiteId($siteId);
    $Log-&gt;setLogTypeId($logTypeId);
    $Log-&gt;setMessage($message);
    $Log-&gt;save();

    ...
  }

  ...

}
</code></pre>

<p>And the Log class:</p>

<pre><code>class Log {

  public function setUserId($userId) {
    if ($this-&gt;userId !== $userId) {
      $this-&gt;userId = $userId;
    }

    return $this;
  }

  public function getUserId() {
    return $this-&gt;userId;
  }

  public function setSiteId($siteId) {
    if ($this-&gt;siteId !== $siteId) {
      $this-&gt;siteId = $siteId;
    }

    return $this;
  }

  public function getSiteId() {
    return $this-&gt;siteId;
  }

  ...

}
</code></pre>

<p>As well as the LogMapper class:</p>

<pre><code>class LogMapper extends DataMapper {

  ...

  public static function create($row = false) {
    return new Log($row);
  }

  public static function getById($id) {
    ...
  }

}
</code></pre>

<p>As you can see, I have two other classes, LogMapper and Log, which Logger uses to write records to a database.</p>

<p>I also have a mechanism that emails me when a fatal error occurs. I received the following in about a dozen emails:</p>

<pre><code>Call to undefined method Log::setUserId()
</code></pre>

<p>My application uses autoloading, and I first thought that may be the problem, but clearly the Logger class is being loaded, and so autoloading has not broken. The path for the Log class is correct in the autoloader...and clearly the Log class has been loaded--otherwise a "Class 'Log' not found" error would have been thrown.</p>

<p>Any ideas what may be causing this error? I do use eAccelerator on the release.</p>
