Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001114 [Quercus] minor always 05-16-06 13:58 05-16-06 18:56
Reporter koreth View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.0.20 Product Version 3.0.20
  Product Build
Summary 0001114: Can't use socket as array index
Description PHP code:

<?php
$sock = fsockopen("www.sun.com", 80);
$foo[$sock] = 'x';
print $foo[$sock] . "\n";
?>

This outputs "x" on Zend PHP; Quercus throws an exception:

com.caucho.quercus.QuercusExecutionException: com.caucho.quercus.QuercusRuntimeException
ResourceValue[] is not a valid key
    at com.caucho.quercus.env.Value.toKey(Value.java:261)
    at com.caucho.quercus.env.ArrayValueImpl.createEntry(ArrayValueImpl.java:704)
    at com.caucho.quercus.env.ArrayValueImpl.put(ArrayValueImpl.java:307)
    at com.caucho.quercus.expr.ArrayGetExpr.evalAssign(ArrayGetExpr.java:190)
    at com.caucho.quercus.expr.AssignExpr.eval(AssignExpr.java:83)
    at com.caucho.quercus.program.ExprStatement.execute(ExprStatement.java:78)
    at .(/Users/sgrimm/resin/resin/webapps/test/test.php:3)

The PHP "memcached" client library uses sockets as array indexes (that's where the error is cropping up in my real code.)
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0001144)
ferg
05-16-06 18:56

php/1m0c
 

- Issue History
Date Modified Username Field Change
05-16-06 13:58 koreth New Issue
05-16-06 18:56 ferg Note Added: 0001144
05-16-06 18:56 ferg Assigned To  => ferg
05-16-06 18:56 ferg Status new => closed
05-16-06 18:56 ferg Resolution open => fixed
05-16-06 18:56 ferg Fixed in Version  => 3.0.20


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