Mantis - Quercus
Viewing Issue Advanced Details
3813 major always 12-15-09 06:50 12-17-09 18:35
jcalfee  
 
normal  
new 4.0.2  
open  
none    
none  
0003813: accessing an array element
Summary:
Native php can assess an array element like this array{"element"}, however Caucho requires a more standard syntax array["element"].

I have more than 300 references in OpenEMR like this:
  $resvalue = $result[0]{"name"};

They work fine under apache and php. In Caucho however, I have to convert it to the following:

  $resvalue = $result[0]["name"];

Can you please support this php syntax? It is not an option for me to modify OpenEMR in such an extensive way.

I'm not sure if you need the following, so here it is just in case:

sqlFetchArray simply returns mysql_fetch_array($resource, MYSQL_ASSOC);

This is how the $result array is populated:

for ($iter = 0;$row = sqlFetchArray($res);$iter++)
    $result[$iter] = $row;




Notes
(0004353)
nam   
12-17-09 18:35   
I believe Quercus does support {} array access to some extent, but it appears that we did not cover all the cases. It's something we'll need to fix.