title: 'Fatal error call to private method' but method is protected
body: <p>First time extending a class in PHP and I'm getting a fatal error that says the method is private when it's not. I'm sure it's something elementary, but I've studied books and forums, and I just can't pin down what I've done to generate this error. Any help greatly appreciated. Details below:</p>
  
  <p>Error message:</p>
  
  <blockquote>
    <blockquote>
      <p>Fatal error: Call to private method testgiver::dbConnect() from context 'testprinter' in /root/includes/classes/testprinter.php on line 726</p>
    </blockquote>
  </blockquote>
  
  <p>Line 726 of testprinter in the code below:</p>
  
  <pre><code>private function buildquestionarray()
  {
    $query = "etc etc";
    **$conn = $this-&gt;dbConnect('read');
    $result = $conn-&gt;query($query);
    ...
  </code></pre>
  
  <p>Testprinter extends testgiver. Here's the extension of the class:</p>
  
  <pre><code>require_once('testgiver.php');
  
  class testprinter extends testgiver
  {...
  </code></pre>
  
  <p>And the declaration of the method in testgiver:</p>
  
  <pre><code>protected function dbConnect($userconnecttype)
  {...
  </code></pre>
  
  <p>Thanks again!</p>