Invoke operation error
<p>I have the following function in the php script,</p>

<pre><code>public function createPorductstatushistory($item) {

    $stmt = mysqli_prepare($this-&gt;connection, "INSERT INTO $this-&gt;tablename (timeStamp, ProductDetail_idProduct, ProductStatus_idStatus) VALUES (?, ?, ?)");
    $this-&gt;throwExceptionOnError();

    mysqli_stmt_bind_param
    ($stmt, 'sii', 
    $item-&gt;timeStamp-&gt;toString('YYYY-MM-dd HH:mm:ss'), 
    $item-&gt;ProductDetail_idProduct, 
    $item-&gt;ProductStatus_idStatus);
    $this-&gt;throwExceptionOnError();

    mysqli_stmt_execute($stmt);     
    $this-&gt;throwExceptionOnError();

    $autoid = mysqli_stmt_insert_id($stmt);

    mysqli_stmt_free_result($stmt);     
    mysqli_close($this-&gt;connection);

    return $autoid;
}
</code></pre>

<p>but, everytime I go to the part "$item->timeStamp->toString('YYYY-MM-dd HH:mm:ss')". The following error pop up.</p>

<blockquote>
  <p>There was an error while invoking the operation. Check your operation
  inputs or server code and try invoking the operation again. </p>
  
  <p>Reason:  Notice: Trying to get property of non-object in
  C:\xampp\htdocs\fypweee_admin\FYPadminSideV3-debug\services\PorductstatushistoryService.php
  on line 125</p>
  
  <p>Fatal error: Call to a member function toString() on a non-object in
  C:\xampp\htdocs\fypweee_admin\FYPadminSideV3-debug\services\PorductstatushistoryService.php
  on line 125</p>
</blockquote>

<p>Is this mean the  <code>timeStamp</code> var need to be in format of 'YYYY-MM-dd HH:mm:ss'?</p>
