Help: I'm getting the errors when i try to commit source code from the IDE via Git

When i right click a specific file and hit commit i get a warning. When i hit review I get the error:

Warning:(45,14) Undefined class IOException

Warning:(77,14) Undefined class IOException

Which corresponds to this bit of code:

throw new IOException("Directory $this->templateDirectory does not have read privilages.");

I can't see what the problem is as thats a built in PHP function. Any assistance in this matter would be greatly appreciated.



1 comment
Comment actions Permalink

Sorry for the double post, I couldn't edit my previous post. Fixed the other error now there is a new error:

Undefined variable 'xp'

Here is my code:

     * gets user info and populates it
     * @param String $username username of user to retrieve info of
     public function getInfo($username)
          // prepare the sql statement
          $statement = $this->db->prepare('SELECT email, notificationpreference, xp FROM ' . TABLE_USERS . ' WHERE USERNAME = ? LIMIT 1');

          // bing the variables
          $statement->bind_param('s', $username);

          // if the statement executed successfully
          if ($statement->execute())
               // get the number of results
               $statement->bind_result($email, $notificationprefernce, $xp);

               // fetch the results

               // if a result exists
                    $this->email = $email;
                $this->notificationpreference = $notificationprefernce;
                    $this->xp = $xp;

        // return success
        return true;
    // query failed so return false
    return false;

Here is the offending line:

$statement->bind_result($email, $notificationprefernce, $xp);

The funny thing is it isn't complaining about the other 2 variables even though they are in the same boat. Any assistance in this matter would be greaty appreciated.




Please sign in to leave a comment.