0

I am working with php, Flex and zend's AMF Server using this guide. I successfully managed to connect php with Flex but after 'reconstruction' of my MySQL query I get a little bit different objects - some of their values are NULL. That confuses Flex and I get an error from my RemoteObject:
Was expecting mx.messaging.messages.AcknowledgeMessage, but received null
I was searching around the web, and I believe it is happening because some values are NULL, but I couldn't find appropriate solution... I hope that someone here will be able to help me =)

Thanks in advance!

errata
  • 5,695
  • 10
  • 54
  • 99
  • You have to fix whatever is causing null values. It's hard to say anything without seeing php/mysql part. – Amarghosh Nov 12 '09 at 11:13
  • Of course, I also believe that it would solve my problem... But I wonder is there some simpler solution than writing lots of IF conditions in php to handle it if value is NULL...? My php/sql part is really long, but basically I retrieve values from relational database using LEFT JOIN syntax and I format values to php object and send that object to Flex... – errata Nov 12 '09 at 11:22

1 Answers1

0

I'm not sure this is a null value - I suspect you have an error in your PHP code, and it's getting a null instead of a AcknowledgeMessage because the PHP is erroring out before it sends anything back. Have you tried running it directly (i.e., not from Flex)?

I've found Charles Proxy (http://www.charlesproxy.com/) an invaluable tool for debugging such issues. You have to pay for it ($50), but the amount I've saved on Excedrin Migraine has paid for it.

davearchie
  • 317
  • 2
  • 9
  • Hey, thanks for help, I am outside of town at the moment, but as I remember, when I use var_dump in PHP, my object looks as I expect it... Inside of it, I get some strings and arrays. Some of the arrays contain NULL values. I don't see it as problem for PHP to handle NULL values... I have some ideas now so I will try to do it when I get back... Thanks! – errata Nov 27 '09 at 16:57