Author: rhs
Date: Sun Oct 28 23:35:42 2012
New Revision: 1403127

URL: http://svn.apache.org/viewvc?rev=1403127&view=rev
Log:
deal with non string keys for php arrays

Modified:
    qpid/proton/trunk/proton-c/bindings/php/proton.php

Modified: qpid/proton/trunk/proton-c/bindings/php/proton.php
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/bindings/php/proton.php?rev=1403127&r1=1403126&r2=1403127&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/bindings/php/proton.php (original)
+++ qpid/proton/trunk/proton-c/bindings/php/proton.php Sun Oct 28 23:35:42 2012
@@ -971,6 +971,27 @@ class Data {
         $result = array();
         while ($this->next()) {
           $k = $this->get_object();
+          switch ($this->type()) {
+          case Data::BINARY:
+            $k = $k->bytes;
+            break;
+          case Data::SYMBOL:
+            $k = $k->name;
+            break;
+          case Data::STRING:
+          case Data::UBYTE:
+          case Data::BYTE:
+          case Data::USHORT:
+          case Data::SHORT:
+          case Data::UINT:
+          case Data::INT:
+          case Data::ULONG:
+          case Data::LONG:
+            break;
+          default:
+            $k = "$k";
+            break;
+          }
           if ($this->next())
             $v = $this->get_object();
           else



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to