title: CodeIgniter extending library + using another library
body: <p>I am trying to extend form validation library with this code:</p>
  
  <pre><code>class MY_Form_validation extends CI_Form_validation {
  
      public function __construct() {
          parent::__construct();
      }
  
      public function check_captcha($captcha)
      {
          if ($captcha == $this-&gt;session-&gt;userdata('captcha'))
          {
              return TRUE;
          }   else
          {
              $this-&gt;form_validation-&gt;set_message('check_captcha', "Please copy captcha again.");
              return FALSE;
          }
      }
  }
  </code></pre>
  
  <p>When I run validation I get this error:</p>
  
  <pre><code>Message: Undefined property: MY_Form_validation::$session
  Filename: libraries/MY_Form_validation.php
  </code></pre>
  
  <p>I tried to load the session library at construct but I got again error. Is there any option to use session library inside or should I pass the value from session as 2nd parameter?</p>