Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > PHP/MySQL > Pro PHP
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Pro PHP Advanced PHP coding discussions. Beginning-level questions will be redirected to the Beginning PHP forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro PHP section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 19th, 2005, 04:33 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default Fatal Error Message

Has anybody ever come across an error like this I am not sure what it means in order to track it down

Fatal error: Call to a member function on a non-object in c:serverpath\paypal_dp.php on line 236

if(!Services_PayPal::isError($response))
 {
$errors = $response->getErrors();
$error_code = $errors->getErrorCode(); ----line 236
}

Peace
Mike
http://www.eclecticpixel.com
http://www.homegrownmusicjam.com
__________________
Peace
Mike
http://www.eclecticpixel.com
Reply With Quote
  #2 (permalink)  
Old October 19th, 2005, 04:39 PM
richard.york's Avatar
Wrox Author
Points: 5,506, Level: 31
Points: 5,506, Level: 31 Points: 5,506, Level: 31 Points: 5,506, Level: 31
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Camby, IN, USA.
Posts: 1,706
Thanks: 0
Thanked 6 Times in 6 Posts
Default

It means $errors is not an object. Do a var_dump() on $errors to see what $response->getErrors() is returning.

Regards,
Rich

--
[http://www.smilingsouls.net]
Mail_IMAP: A PHP/C-Client/PEAR solution for webmail
Author: Beginning CSS: Cascading Style Sheets For Web Design
Reply With Quote
  #3 (permalink)  
Old October 19th, 2005, 05:01 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It's returning this.

array(2) {
[0]=> &object(errortype)(9) {
["_elements"]=> array(5) {
["ShortMessage"]=> array(3) {
["required"]=> bool(true)
["type"]=> string(6) "string"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" }
["LongMessage"]=> array(3) {
["required"]=> bool(false)
["type"]=> string(6) "string"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" }
["ErrorCode"]=> array(3) {
["required"]=> bool(true)
["type"]=> string(5) "token"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" }
["SeverityCode"]=> array(3) {
["required"]=> bool(true)
["type"]=> string(16) "SeverityCodeType"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" }
["ErrorParameters"]=> array(3) {
["required"]=> bool(false)
["type"]=> string(18) "ErrorParameterType"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } }
["_attributes"]=> array(0) { }
["_attributeValues"]=> array(0) { }
["_namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents"
["ShortMessage"]=> string(37) "The Billing Address State is invalid."
["LongMessage"]=> string(125) "The field Billing Address State is in an invalid format. For US states and territories, enter a valid two letter state code."
["ErrorCode"]=> string(5) "10751"
["SeverityCode"]=> string(5) "Error"
["ErrorParameters"]=> NULL }
[1]=> &object(errortype)(9) {
["_elements"]=> array(5) {
["ShortMessage"]=> array(3) {
["required"]=> bool(true)
["type"]=> string(6) "string"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" }
["LongMessage"]=> array(3) {
["required"]=> bool(false)
["type"]=> string(6) "string"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" }
["ErrorCode"]=> array(3) {
["required"]=> bool(true)
["type"]=> string(5) "token"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" }
["SeverityCode"]=> array(3) {
["required"]=> bool(true)
["type"]=> string(16) "SeverityCodeType"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" }
["ErrorParameters"]=> array(3) {
["required"]=> bool(false)
["type"]=> string(18) "ErrorParameterType"
["namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents" } }
["_attributes"]=> array(0) { }
["_attributeValues"]=> array(0) { }
["_namespace"]=> string(31) "urn:ebay:apis:eBLBaseComponents"
["ShortMessage"]=> string(38) "The Shipping Address State is invalid."
["LongMessage"]=> string(126) "The field Shipping Address State is in an invalid format. For US states and territories, enter a valid two letter state code."
["ErrorCode"]=> string(5) "10750"
["SeverityCode"]=> string(5) "Error"
["ErrorParameters"]=> NULL } }
Reply With Quote
  #4 (permalink)  
Old October 20th, 2005, 11:39 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Oklahoma City, Oklahoma, USA.
Posts: 249
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Resolution to the problem, from paypal. They grab more information than just the ErrorCode.

for ($i=1; $i < count($response->Errors); $i++) {
echo "Error #: " . $i . "<br>";
echo "The error code was :<b> " . $response->Errors[$i]->ErrorCode. "</b><br>";
echo "Short Message:<b> " . $response->Errors[$i]->ShortMessage. "</b><br>";
echo "Long Message:<b> " . $response->Errors[$i]->LongMessage. "</b><br>";
echo "Correlation ID:<b> " . $response->CorrelationID. "</b><br><p />";
}

Peace
Mike
http://www.eclecticpixel.com
http://www.homegrownmusicjam.com
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
fatal error LNK1120: Yomero C++ Programming 0 November 11th, 2008 04:35 PM
FATAL ERROR. Help me please??? steviej1 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 11 February 27th, 2007 07:05 AM
Fatal Error?? dparsons ASP.NET 1.0 and 1.1 Professional 0 December 18th, 2006 12:55 PM
fatal error!!!! Ashleek007 Beginning PHP 6 October 9th, 2004 10:25 AM
Fatal error: singhzubin BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 2 April 11th, 2004 04:14 AM



All times are GMT -4. The time now is 04:13 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.