Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003158 [Quercus] minor always 12-12-08 09:07 12-12-08 11:23
Reporter koreth View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003158: Wrong type passed to array_slice() causes compile failure
Description <?php
function foo() {
  $x = array(1,2,3);
  $min_range = 0;
  $max_range = count($x) - 1;

  $middle = (int) (($min_range + $max_range) / 2);
  $larger_value = key(array_slice($x, $middle + 1, 1, true));
}

Fails to compile on the latest Resin Pro:

[09:05:23.405] {resin-12} com.caucho.java.JavaCompileException: .../_array_0slice__php.java:65: array_slice(com.caucho.quercus.env.Env,com.caucho.quercus.env.ArrayValue,long,com.caucho.quercus.env.Value,boolean) in com.caucho.quercus.lib.ArrayModule cannot be applied to (com.caucho.quercus.env.Env,com.caucho.quercus.env.ArrayValue,double,com.caucho.quercus.env.Value,boolean)
[09:05:23.405] {resin-12} v_larger_value = ArrayModule.key(_quercus_module_3.array_slice(env, v_x.toValue().toArrayValue(env), ((double) v_middle + 1L), qv_1_0, true));
Additional Information
Attached Files

- Relationships

- Notes
(0003610)
nam
12-12-08 11:23

php/3aap
 

- Issue History
Date Modified Username Field Change
12-12-08 09:07 koreth New Issue
12-12-08 10:18 nam Status new => assigned
12-12-08 10:18 nam Assigned To  => nam
12-12-08 11:23 nam Status assigned => closed
12-12-08 11:23 nam Note Added: 0003610
12-12-08 11:23 nam Resolution open => fixed
12-12-08 11:23 nam Fixed in Version  => 4.0.0


Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker