title: Fatal error: Using $this when not in object context
body: <p>here is the part if having error.</p>
  
  <blockquote>
    <p>Fatal error: Using $this when not in
    object context in
    /pb_events.php
    on line 6</p>
  </blockquote>
  
  <p>line 6 is:     <code>$jpp = $this-&gt;vars-&gt;data["jpp"];</code></p>
  
  <pre><code>function DoEvents($this) {
  
      global $_CONF, $_PAGE, $_TSM , $base;
  
      $jpp = $this-&gt;vars-&gt;data["jpp"];
  
      $cache["departments"] = $this-&gt;db-&gt;QFetchRowArray("SELECT * FROM {$this-&gt;tables[job_departments]}");
      $cache["locations"] = $this-&gt;db-&gt;QFetchRowArray("SELECT * FROM {$this-&gt;tables[job_location]}");
      $cache["names"] = $this-&gt;db-&gt;QFetchRowArray("SELECT * FROM {$this-&gt;tables[job_names]}");
      $cache["categories"] = $this-&gt;db-&gt;QFetchRowArray("SELECT * FROM {$this-&gt;tables[job_categories]}");
  </code></pre>
  
  <p>Thanks a lot! appreciate!</p>