Error - Trying to get property of non-object
Posted
by
Patrick Lanfranco
on Stack Overflow
See other posts from Stack Overflow
or by Patrick Lanfranco
Published on 2012-09-04T01:24:11Z
Indexed on
2012/09/04
3:38 UTC
Read the original article
Hit count: 133
php
I am currently getting this error on one of my files:
/var/www/vhosts/httpdocs/generator/index.php on line 6
Line 6 would be resulting in:
echo $results->GetBookCodesResult->BookCodes->BookInfo->ServiceCode;
My code:
<?php
$config['soap_url'] = "http://myservice.com?WSDL";
if(isset($_REQUEST['codes'])) {
$results = request_Data(explode("\n",$_REQUEST['codes']));
echo $results->GetBookCodesResult->BookCodes->BookInfo->ServiceCode;
}
....
What is the best method to have this fixed? Some advice would be appreciated.
© Stack Overflow or respective owner