Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Fatal error with class ticket

I try to create a ticket using osticket API, it works using basic information, so I've tried with an osticket more developped it generates a Fatal error: Call to a member function getHastable() on a non-object in D:\wamp\www\osticket\include\class.ticket.php on line 3125

The line 3125 is as follow:

$staff = $thisstaff->getHastable();
if(strpos($staff['group_name'],"Commercial")!==false){
   // So we save his ID 
   $comID = $staff['staff_id'];
}

The array I send using API contains only defined values (I use the id of each attribute to create the ticket directly).

Thanks in advance.

Comments

  • Do you mean getHashtable?
  • Hello, yep but it's a second one I use as hash method.

    function getHastable() {
            return $this->ht;
        }
  • So you altered the code and are asking us to help you trouble shoot your changes? Thats not really something that we do here.  You might be better suited posting your code to stackoverflow and see if someone can assist you.  I found this article that might also help:
    http://stackoverflow.com/questions/54566/call-to-a-member-function-on-a-non-object

    The error message says that your trying to perform an action on a variable that is not an object, but it expects it to be.  Since it is not it fails and throws an error. 
  • I've just understood the error, the variable $thisstaff = Null (no object sent) as from where I try to create a ticket don't use an extern session connected with osticket. I search how could I add the connection session between "mypage" and osticket
Sign In or Register to comment.