PHP Classes

I Got Error

Recommend this page to a friend!

      PHP Currency Converter  >  All threads  >  I Got Error  >  (Un) Subscribe thread alerts  
Subject:I Got Error
Summary:Trying to get property of non-object
Messages:3
Author:danidani
Date:2014-12-11 00:53:17
 

  1. I Got Error   Reply   Report abuse  
Picture of danidani danidani - 2014-12-11 00:53:17
Notice: Trying to get property of non-object in E:\xampp\htdocs\cc\pcc\Pcc.php on line 73

Notice: Trying to get property of non-object in E:\xampp\htdocs\cc\pcc\Pcc.php on line 73

Warning: Invalid argument supplied for foreach() in E:\xampp\htdocs\cc\pcc\Pcc.php on line 73
Thanks For Respond

  2. Re: I Got Error   Reply   Report abuse  
Picture of Ettore Moretti Ettore Moretti - 2014-12-11 09:32:28 - In reply to message 1 from danidani
Hello, thank you for having reported the bug.

I have inserted in the class Pcc a check on the consistency of the xml returned by the webservice of yahoo, you should now receive an error message in the Output and not a warning PHP.

To correct your error you should check the input array and\or the connection from your server to the webservice yahoo.

If you can't solve send me the code that uses, without I wouldn't know to give you further advice.

Greetings Ettore

  3. Re: I Got Error   Reply   Report abuse  
Picture of Tone Excel Web Tone Excel Web - 2014-12-11 23:46:02 - In reply to message 2 from Ettore Moretti
Just remove the line 114 to 116 and delete the "..." at line 72. It should return the array result.

The input array format $input = array(array('USD','MYR',200));
this is not working $input = array('USD','MYR',200);

Nice code nice works! Thanks a lot :)