View Single Post
Old 05-31-2009, 03:34 PM   #115 (permalink)
SeiferTim
The Visitor
 
SeiferTim's Avatar
 
Join Date: May 2009
Posts: 1
Thanks: 1
SeiferTim is on a distinguished road
Default

Quote:
Originally Posted by teafourtwo View Post
Awesome piece of work.

I am running into weird issues.
Sometimes it works... sometimes it doesn't.

I uploaded, made my changes, didn't work.
Came back the next day, it worked without any changes.
I was just looking at it again without making any changes and pushed "refresh." Broken.

Fatal error: Call to a member function children() on a non-object in [superlongaddress] on line 17

line 17: foreach ($guildxml->guildInfo->guild->members->children() as $char) {

And sometimes it will also be an error on line 14 related to the SimpleXMLElement.

Errors change without any changes to the script.

So I'm a bit confused on why it keeps buggin out.

Once again, it looks wonderful.
Thank you.
It looks like you're having a similar problem that I've had to deal with... first, if the armory is down, say for maintenance, when you grab the data it will sometimes come back as blank or null, and then trying to do anything to it will error out. You could put a check that says: if ($charxml != '') { just before doing the SimpleXMLElement on it...

Also, it seems like the Armory has some kind of system to block repeat requests from the same address - this might be more of a problem the more hits to your page your get - some viewers might see the correct information, others may get an error or something else because Blizzard blocked the request.

I set up a cacheing system (which is still a little buggy) to try to avoid those 2 issues... you might want to try and do the same.

Good luck!
-Tim http://timsworld.nfshost.com
Send a message via AIM to SeiferTim
SeiferTim is offline  
Reply With Quote