Mantis - Quercus
Viewing Issue Advanced Details
3361 major always 02-26-09 18:14 02-26-09 21:56
koreth  
nam  
normal  
closed 4.0.0  
fixed  
none    
none 4.0.0  
0003361: String "[]" operator fails to compile
<?php
function foo() {
  $x = ' ';
  $x[0] = 'x';
}

Doesn't compile:

[18:12:12.722] {resin-29} com.caucho.java.JavaCompileException: .../_string_22darray__php.java:60: incompatible types
[18:12:12.722] {resin-29} found : com.caucho.quercus.env.Value
[18:12:12.722] {resin-29} required: com.caucho.quercus.env.StringValue
[18:12:12.722] {resin-29} (v_x = v_x.toAutoArray()).put(qv_0_1, qv_x_2);

Notes
(0003848)
koreth   
02-26-09 18:24   
Changing the "[]" to "{}" seems to make it work.
(0003849)
nam   
02-26-09 21:56   
php/3492